Old style exceptions --> new style exceptions

This commit is contained in:
cclauss
2017-07-19 14:12:33 +02:00
committed by GitHub
parent b670b0d583
commit 15b1a91b07

View File

@@ -76,9 +76,9 @@ for pipe_name, pipe_uuid in pipes.items():
else: else:
print('{}: Ok ({})'.format(pipe_name, str(e))) print('{}: Ok ({})'.format(pipe_name, str(e)))
dce.disconnect() dce.disconnect()
except smb.SessionError, e: except smb.SessionError as e:
print('{}: {}'.format(pipe_name, nt_errors.ERROR_MESSAGES[e.error_code][0])) print('{}: {}'.format(pipe_name, nt_errors.ERROR_MESSAGES[e.error_code][0]))
except smbconnection.SessionError, e: except smbconnection.SessionError as e:
print('{}: {}'.format(pipe_name, nt_errors.ERROR_MESSAGES[e.error][0])) print('{}: {}'.format(pipe_name, nt_errors.ERROR_MESSAGES[e.error][0]))