Changeset 3629
- Timestamp:
- 17/10/08 20:01:46 (3 months ago)
- Location:
- trunk/beacon/src
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/beacon/src/client.py
r3624 r3629 260 260 # Reset monitors to queries 261 261 for query in self._queries: 262 if query != None and query. monitoring:263 query. monitoring = False262 if query != None and query._beacon_monitoring: 263 query._beacon_monitoring = False 264 264 query.monitor(True) 265 265 … … 274 274 for q in self._queries: 275 275 if q != None: 276 q. monitoring = False276 q._beacon_monitoring = False 277 277 self._queries = [] 278 278 self.rpc = None … … 382 382 self._queries.remove(query) 383 383 continue 384 if query. monitoring:385 query. monitoring = False384 if query._beacon_monitoring: 385 query._beacon_monitoring = False 386 386 query.monitor(True) 387 387 for m in new_media: -
trunk/beacon/src/query.py
r3616 r3629 37 37 # kaa imports 38 38 import kaa 39 from kaa.utils import property 39 40 40 41 # kaa.beacon imports … … 83 84 Query.NEXT_ID += 1 84 85 # public variables 85 self. monitoring = False86 self._beacon_monitoring = False 86 87 self.result = [] 87 88 # internal variables … … 109 110 110 111 def monitor(self, status=True): 112 log.warning('query.monitor is deprectated') 113 self.monitoring = status 114 115 @property 116 def monitoring(self): 111 117 """ 112 118 Turn on/off query monitoring 113 114 @param status: True to turn on monitoring, False to turn it off. 115 """ 116 if self.monitoring == status: 119 """ 120 return self._beacon_monitoring 121 122 @monitoring.setter 123 def monitoring(self, status) 124 """ 125 Turn on/off query monitoring 126 """ 127 if self._beacon_monitoring == status: 117 128 # Nothing to do 118 129 return … … 120 131 # If the client is not connected yet, it will do this later. 121 132 # Rememeber that we wanted to connect 122 self. monitoring = status133 self._beacon_monitoring = status 123 134 return 124 135 if status: … … 136 147 self._rpc('monitor.remove', self._client.id, self.id) 137 148 # Store current status 138 self. monitoring = status149 self._beacon_monitoring = status 139 150 140 151 … … 246 257 # FIXME: replace the __del__ with a weakref monitoring all 247 258 # queries. There is already a weakref in client.py 248 if self. monitoring:259 if self._beacon_monitoring: 249 260 self.monitor(False) 250 261
