1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

s4/scripting/smbstatus: approach py3 compatibility

It is still unused and untested, probably not working.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2019-03-17 17:17:28 +13:00 committed by Andrew Bartlett
parent 9c630b4bfd
commit 66620567ae

View File

@ -84,8 +84,8 @@ if opts.nbt:
else:
try:
conn = open_connection("smb_server")
except RuntimeError, (num, msg):
if msg == 'NT_STATUS_OBJECT_NAME_NOT_FOUND':
except RuntimeError as e:
if e.args[1] == 'NT_STATUS_OBJECT_NAME_NOT_FOUND':
print("No active connections")
else:
show_sessions(conn)