cn: %s
""" % (sid, unixid, sid, type_string, sid)
- self.add(self.parse_ldif(mod).next()[1])
+ self.add(next(self.parse_ldif(mod))[1])
self.current_pid = None
self.outf.write("Initialized cache_ldb[%s]\n" % (cache_ldb))
msgs = self.cache.parse_ldif(add_ldif)
- changetype,msg = msgs.next()
+ changetype,msg = next(msgs)
ldif = self.cache.write_ldif(msg, ldb.CHANGETYPE_NONE)
self.outf.write("%s" % ldif)
else:
def show_sessions(conn):
"""show open sessions"""
- sessions = conn.smbsrv_information(irpc.SMBSRV_INFO_SESSIONS).next()
+ sessions = next(conn.smbsrv_information(irpc.SMBSRV_INFO_SESSIONS))
print "User Client Connected at"
print "-" * 79
for session in sessions:
def show_tcons(open_connection):
"""show open tree connects"""
conn = open_connection("smb_server")
- tcons = conn.smbsrv_information(irpc.SMBSRV_INFO_TCONS).next()
+ tcons = next(conn.smbsrv_information(irpc.SMBSRV_INFO_TCONS))
print "Share Client Connected at"
print "-" * 79
for tcon in tcons:
def show_nbt(open_connection):
"""show nbtd information"""
conn = open_connection("nbt_server")
- stats = conn.nbtd_information(irpc.NBTD_INFO_STATISTICS).next()
+ stats = next(conn.nbtd_information(irpc.NBTD_INFO_STATISTICS))
print "NBT server statistics:"
fields = [("total_received", "Total received"),
("total_sent", "Total sent"),