Cleanup deprecated exception checking
Exception.message is deprecated in python2.6 and removed in python3. Switch use of that to str(Exception) instead to use non deprecated code paths. Change-Id: I040d650c277454a9170ca256c0a936d928a81f95
This commit is contained in:
parent
2df3683358
commit
9e60d69a01
|
@ -39,7 +39,7 @@ def delete_offline_nodes(server, timeout):
|
|||
except jenkins.NotFoundException:
|
||||
pass
|
||||
except jenkins.JenkinsException as e:
|
||||
if '[500]' in e.message:
|
||||
if '[500]' in str(e):
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
@ -78,7 +78,7 @@ def main():
|
|||
except jenkins.NotFoundException:
|
||||
pass
|
||||
except jenkins.JenkinsException as e:
|
||||
if '[500]' in e.message:
|
||||
if '[500]' in str(e):
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
|
Loading…
Reference in New Issue