Changeset 944 for trunk/tcosmonitor/LocalData.py
- Timestamp:
- 08/06/08 19:52:38 (5 months ago)
- Files:
-
- 1 modified
-
trunk/tcosmonitor/LocalData.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tcosmonitor/LocalData.py
r930 r944 319 319 return False 320 320 return True 321 except: 321 except Exception, err: 322 print_debug("ipValid() Exception, error=%s"%err) 322 323 return False 323 324 … … 325 326 try: 326 327 return socket.getaddrinfo(hostname, None)[0][4][0] 327 except: 328 except Exception, err: 329 print_debug("GetIpAddress() Exception, error=%s"%err) 328 330 return None 329 331 … … 353 355 self.add_to_cache( ip, 1 , self.hostname ) 354 356 return self.hostname 355 except: 357 except Exception, err: 358 print_debug("GetHostname() Exception, error=%s"%err) 356 359 pass 357 360 … … 436 439 437 440 def GetLast(self, ip, ingroup=None): 441 start=time() 438 442 last=None 439 443 data={} … … 498 502 data={"pid":last.ut_pid, "user":last.ut_user, "host":last.ut_host.split(":")[0], "time":last.ut_tv[0], "timelogged":timelogged, "exclude":exclude} 499 503 print_debug("IsLast() data=%s"%data) 504 crono(start, "GetLast()") 500 505 return data 501 506
