summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/smbstatus
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-18 21:32:30 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-18 21:32:30 +0200
commita48f19b6c2c954e743438e9f2814289247ba3fc6 (patch)
tree976daa7aee05212ff3cf4156a5b2a03aa3681468 /source4/scripting/bin/smbstatus
parentacffa3ddbfe982ee0c2f8d1eb45993fd655db674 (diff)
downloadsamba-a48f19b6c2c954e743438e9f2814289247ba3fc6.tar.gz
samba-a48f19b6c2c954e743438e9f2814289247ba3fc6.tar.bz2
samba-a48f19b6c2c954e743438e9f2814289247ba3fc6.zip
Remove python extension, simplify some code.
Diffstat (limited to 'source4/scripting/bin/smbstatus')
-rwxr-xr-xsource4/scripting/bin/smbstatus6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/scripting/bin/smbstatus b/source4/scripting/bin/smbstatus
index bbd0e84826..a9265ead6a 100755
--- a/source4/scripting/bin/smbstatus
+++ b/source4/scripting/bin/smbstatus
@@ -22,7 +22,7 @@ def show_sessions(conn):
sessions = conn.smbsrv_information(irpc.SMBSRV_INFO_SESSIONS).next()
print "User Client Connected at"
- print "-------------------------------------------------------------------------------"
+ print "-" * 79
for session in sessions:
fulluser = "%s/%s" % (session.account_name, session.domain_name)
print "%-30s %16s %s" % (fulluser, session.client_ip, sys.httptime(session.connect_time))
@@ -33,7 +33,7 @@ def show_tcons(open_connection):
conn = open_connection("smb_server")
tcons = conn.smbsrv_information(irpc.SMBSRV_INFO_TCONS).next()
print "Share Client Connected at"
- print "-------------------------------------------------------------------------------"
+ print "-" * 79
for tcon in tcons:
print "%-30s %16s %s" % (tcon.share_name, tcon.client_ip, sys.httptime(tcon.connect_time))
@@ -76,7 +76,7 @@ else:
try:
conn = open_connection("smb_server")
except RuntimeError, (num, msg):
- if msg == 'NT_STATUS_OBJECT_NAME_NOT_FOUND':
+ if msg == 'NT_STATUS_OBJECT_NAME_NOT_FOUND':
print "No active connections"
else:
show_sessions(conn)