Merge "Python 3: Don't use BaseException.message attribute"
This commit is contained in:
commit
12cab0e30f
@ -40,7 +40,7 @@ def deep_format(obj, paramdict, allow_empty=False):
|
||||
else:
|
||||
ret = CustomFormatter(allow_empty).format(obj, **paramdict)
|
||||
except KeyError as exc:
|
||||
missing_key = exc.message
|
||||
missing_key = exc.args[0]
|
||||
desc = "%s parameter missing to format %s\nGiven:\n%s" % (
|
||||
missing_key, obj, pformat(paramdict))
|
||||
raise JenkinsJobsException(desc)
|
||||
@ -55,7 +55,7 @@ def deep_format(obj, paramdict, allow_empty=False):
|
||||
ret[CustomFormatter(allow_empty).format(item, **paramdict)] = \
|
||||
deep_format(obj[item], paramdict, allow_empty)
|
||||
except KeyError as exc:
|
||||
missing_key = exc.message
|
||||
missing_key = exc.args[0]
|
||||
desc = "%s parameter missing to format %s\nGiven:\n%s" % (
|
||||
missing_key, obj, pformat(paramdict))
|
||||
raise JenkinsJobsException(desc)
|
||||
|
Loading…
Reference in New Issue
Block a user