282 | | self.printerStatus = int(varBinds[1][1].prettyPrint() or "2") # or unknown |
283 | | self.deviceStatus = int(varBinds[2][1].prettyPrint() or "1") # or unknown |
| 282 | try : |
| 283 | self.printerStatus = int(varBinds[1][1].prettyPrint()) |
| 284 | except ValueError : |
| 285 | self parent.filter.logdebug("The printer reported a non-integer printer status, it will be converted to 2 ('unknown')") |
| 286 | self.printerStatus = 2 |
| 287 | try : |
| 288 | self.deviceStatus = int(varBinds[2][1].prettyPrint()) |
| 289 | except ValueError : |
| 290 | self.parent.filter.logdebug("The printer reported a non-integer device status, it will be converted to 1 ('unknown')") |
| 291 | self.deviceStatus = 1 |