mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Modernize 'except' clauses
The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej <tbabej@redhat.com>
This commit is contained in:
committed by
Tomas Babej
parent
a651be3eec
commit
27dabb4528
@@ -463,7 +463,7 @@ class Command(HasParam):
|
||||
try:
|
||||
value = values.get(p.name)
|
||||
values[p.name] = p(value, **values)
|
||||
except InvocationError, e:
|
||||
except InvocationError as e:
|
||||
errors[p.name] = str(e)
|
||||
return dict(
|
||||
values=values,
|
||||
@@ -591,7 +591,7 @@ class Command(HasParam):
|
||||
|
||||
try:
|
||||
return param(raw, **kw)
|
||||
except (ValidationError, ConversionError), e:
|
||||
except (ValidationError, ConversionError) as e:
|
||||
# Display error and prompt again
|
||||
self.Backend.textui.print_prompt_attribute_error(unicode(label),
|
||||
unicode(e.error))
|
||||
|
||||
Reference in New Issue
Block a user