Changeset 3161 for pykota

Show
Ignore:
Timestamp:
04/10/07 23:42:38 (18 years ago)
Author:
jerome
Message:

Now catches socket related errors, like DNS server down and the like.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/accounters/snmp.py

    r3160 r3161  
    3737import time 
    3838import select 
     39import socket 
    3940 
    4041try : 
     
    254255                                                  tuple([int(i) for i in hrDeviceStatusOID.split('.')]), \ 
    255256                                                  tuple([int(i) for i in hrPrinterDetectedErrorStateOID.split('.')])) 
     257            except socket.gaierror, msg :                                       
     258                errorIndication = repr(msg) 
    256259            except :                                       
    257260                errorIndication = "Unknown SNMP/Network error. Check your wires."