301 | | return "NOCHARGE" |
302 | | else : |
303 | | action = action.upper() |
304 | | if action not in validactions : |
305 | | raise PyKotaConfigError, _("Option onbackenderror in section %s only supports values in %s") % (printername, str(validactions)) |
| 301 | return ["NOCHARGE"] |
| 302 | else : |
| 303 | action = action.upper().split(",") |
| 304 | error = False |
| 305 | for act in action : |
| 306 | if act not in validactions : |
| 307 | if act.startswith("RETRY:") : |
| 308 | try : |
| 309 | (num, delay) = [int(p) for p in act[6:].split(":", 2)] |
| 310 | except ValueError : |
| 311 | error = True |
| 312 | else : |
| 313 | error = True |
| 314 | if error : |
| 315 | raise PyKotaConfigError, _("Option onbackenderror in section %s only supports values 'charge', 'nocharge', and 'retry:num:delay'") % printername |