python: bulk replace dict.iteritems to items for py3
[kai/samba-autobuild/.git] / python / samba / tests / netcmd.py
index 54f05da35faa5bed674eb686eca3eea93899e72e..2867c031a175d90fe5564186482ffb44776a6a5a 100644 (file)
@@ -36,14 +36,13 @@ class NetCmdTestCase(samba.tests.TestCase):
         return cmd.outf.getvalue(), cmd.errf.getvalue()
 
     def iter_all_subcommands(self):
-        todo = []
-        todo.extend(cmd_sambatool.subcommands.items())
+        todo = list(cmd_sambatool.subcommands.items())
         while todo:
             (path, cmd) = todo.pop()
             yield path, cmd
             subcmds = getattr(cmd, "subcommands", {})
             todo.extend([(path + " " + k, v) for (k, v) in
-                subcmds.iteritems()])
+                subcmds.items()])
 
 
 class TestParmTests(NetCmdTestCase):