Changeset 1948

Show
Ignore:
Timestamp:
11/19/04 11:35:37 (20 years ago)
Author:
jalet
Message:

Catches TypeMismatchError? in SNMP answer handling code

Files:
1 modified

Legend:

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

    r1933 r1948  
    2222# 
    2323# $Log$ 
     24# Revision 1.33  2004/11/19 10:35:37  jalet 
     25# Catches TypeMismatchError in SNMP answer handling code 
     26# 
    2427# Revision 1.32  2004/11/16 23:23:40  jalet 
    2528# Fixed internal PJL handling wrt the 35078 PowerSave mode. 
     
    145148 
    146149try : 
     150    from pysnmp.asn1.encoding.ber.error import TypeMismatchError 
    147151    from pysnmp.mapping.udp.error import SnmpOverUdpError 
    148152    from pysnmp.mapping.udp.role import Manager 
     
    178182            try : 
    179183                tsp.sendAndReceive(req.berEncode(), (self.printerHostname, 161), (self.handleAnswer, req)) 
    180             except SnmpOverUdpError, msg :     
     184            except (TypeMismatchError, SnmpOverUdpError), msg :     
    181185                self.parent.filter.printInfo(_("Network error while doing SNMP queries on printer %s : %s") % (self.printerHostname, msg), "warn") 
    182186            tsp.close()