mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
reword "except Error as e:" into "except Error, e:" to be compatible with Python 2.5 (#5852)
This commit is contained in:
parent
2d0e9cd75d
commit
658c15930e
27 changed files with 118 additions and 118 deletions
|
@ -64,7 +64,7 @@ class LookupModule(object):
|
|||
name, value = param.split('=')
|
||||
assert(name in paramvals)
|
||||
paramvals[name] = value
|
||||
except (ValueError, AssertionError) as e:
|
||||
except (ValueError, AssertionError), e:
|
||||
raise errors.AnsibleError(e)
|
||||
|
||||
if paramvals['delimiter'] == 'TAB':
|
||||
|
|
|
@ -61,7 +61,7 @@ class LookupModule(object):
|
|||
string = 'NXDOMAIN'
|
||||
except dns.resolver.Timeout:
|
||||
string = ''
|
||||
except dns.exception.DNSException as e:
|
||||
except dns.exception.DNSException, e:
|
||||
raise errors.AnsibleError("dns.resolver unhandled exception", e)
|
||||
|
||||
ret.append(''.join(string))
|
||||
|
|
|
@ -68,7 +68,7 @@ class LookupModule(object):
|
|||
paramvals['chars'] = use_chars
|
||||
else:
|
||||
paramvals[name] = value
|
||||
except (ValueError, AssertionError) as e:
|
||||
except (ValueError, AssertionError), e:
|
||||
raise errors.AnsibleError(e)
|
||||
|
||||
length = paramvals['length']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue