Remove invalid argument from format_exc() calls

The argument here is an integer "limit", not the exception.

I think that we only notice this on Python 3 because of exception
chaining.  It causes a real failure though because the exception
handler that is meant to fall into "pass" raises another exception
when ipv6 doesn't work.

Change-Id: I0908a0a3dbb2356caabbffd062379751a0b61c41
This commit is contained in:
Ian Wienand 2019-09-24 12:12:52 +10:00
parent f740369099
commit 20bffbcfc0

View File

@ -70,7 +70,7 @@ def main():
'traceroute6 -n {host}'.format(host=traceroute_host))
passed = True
except (subprocess.CalledProcessError, OSError) as e:
ret['traceroute_v6_exception'] = traceback.format_exc(e)
ret['traceroute_v6_exception'] = traceback.format_exc()
ret['traceroute_v6_output'] = e.output
ret['traceroute_v6_return'] = e.returncode
pass
@ -79,7 +79,7 @@ def main():
'traceroute -n {host}'.format(host=traceroute_host))
passed = True
except (subprocess.CalledProcessError, OSError) as e:
ret['traceroute_v4_exception'] = traceback.format_exc(e)
ret['traceroute_v4_exception'] = traceback.format_exc()
ret['traceroute_v4_output'] = e.output
ret['traceroute_v4_return'] = e.returncode
pass