294 | | self.printerStatus = int(varBinds[1][1].prettyPrint()) |
295 | | self.deviceStatus = int(varBinds[2][1].prettyPrint()) |
| 294 | try : |
| 295 | self.printerStatus = int(varBinds[1][1].prettyPrint()) |
| 296 | except ValueError : |
| 297 | self parent.filter.logdebug("The printer reported a non-integer printer status, it will be converted to 2 ('unknown')") |
| 298 | self.printerStatus = 2 |
| 299 | try : |
| 300 | self.deviceStatus = int(varBinds[2][1].prettyPrint()) |
| 301 | except ValueError : |
| 302 | self.parent.filter.logdebug("The printer reported a non-integer device status, it will be converted to 1 ('unknown')") |
| 303 | self.deviceStatus = 1 |