Changeset 1626
- Timestamp:
- 11/12/08 17:47:57 (2 months ago)
- Files:
-
- branches/0.4.7/lib/cxcore/cxcore/cxnetlink.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.4.7/lib/cxcore/cxcore/cxnetlink.py
r1625 r1626 226 226 result[i] = "reachable" 227 227 228 states = [] 229 228 230 for k in self.server.cache.entriesWithName(i): 229 231 if (k.clazz == zeroconf._CLASS_IN) and (k.type == zeroconf._TYPE_A): 230 if k.state == "stale": 231 result[i] = "stale" 232 states.append(k.state == "reachable") 233 234 235 try: 236 s = any(states) 237 except: 238 if version_info[:2] < (2,5): 239 def _any(iterable): 240 for element in iterable: 241 if element: 242 return True 243 return False 244 s = _any(states) 245 else: 246 raise 247 248 if s: 249 result[i] = "reachable" 250 else: 251 result[i] = "stale" 232 252 233 253 return result.items()
