Changeset 2378
- Timestamp:
- 07/19/05 19:00:19 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/accounters/pjl.py
r2377 r2378 94 94 self.parent.filter.logdebug("I/O Error [%s] : alarm handler probably called" % msg) 95 95 break # our alarm handler was launched, probably 96 except socket.error : 97 self.parent.filter.printInfo(_("Problem while receiving PJL answer from %s:%s : %s") % (self.printerHostname, port, msg), "warn") 96 98 else : 97 99 readnext = 0 … … 101 103 self.printerStatus = line.split("=")[1] 102 104 self.parent.filter.logdebug("Found status : %s" % self.printerStatus) 105 elif line.startswith("PAGECOUNT=") : 106 try : 107 actualpagecount = int(line.split('=')[1].strip()) 108 except ValueError : 109 self.parent.filter.logdebug("Received incorrect datas : [%s]" % line.strip()) 110 else : 111 self.parent.filter.logdebug("Found pages counter : %s" % actualpagecount) 103 112 elif line.startswith("PAGECOUNT") : 104 113 readnext = 1 # page counter is on next line … … 107 116 actualpagecount = int(line.strip()) 108 117 except ValueError : 109 self.parent.filter.logdebug("Received incorrect datas (probably because of a signal): [%s]" % line.strip())118 self.parent.filter.logdebug("Received incorrect datas : [%s]" % line.strip()) 110 119 else : 111 120 self.parent.filter.logdebug("Found pages counter : %s" % actualpagecount)