| 270 | def getPrinterOnBackendError(self, printername) : |
| 271 | """Returns what must be done whenever the real CUPS backend fails.""" |
| 272 | validactions = [ "CHARGE", "NOCHARGE" ] |
| 273 | try : |
| 274 | action = self.getPrinterOption(printername, "onbackenderror") |
| 275 | except PyKotaConfigError : |
| 276 | return "NOCHARGE" |
| 277 | else : |
| 278 | action = action.upper() |
| 279 | if action not in validactions : |
| 280 | raise PyKotaConfigError, _("Option onbackenderror in section %s only supports values in %s") % (printername, str(validactions)) |
| 281 | return action |
| 282 | |