From 9e625c4821f4c63421b3d3747c0c4f358fef6c5f Mon Sep 17 00:00:00 2001 From: Douglas Anderson <danderson@ntia.doc.gov> Date: Sun, 12 Feb 2017 15:52:19 -0800 Subject: python3: update non-GRC components to use python2 or python3 --- gr-utils/python/modtool/scm.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gr-utils/python/modtool/scm.py') diff --git a/gr-utils/python/modtool/scm.py b/gr-utils/python/modtool/scm.py index ec6023ab3b..f219cc3aaa 100644 --- a/gr-utils/python/modtool/scm.py +++ b/gr-utils/python/modtool/scm.py @@ -20,6 +20,9 @@ # """ Class to handle source code management repositories. """ +from __future__ import print_function +from __future__ import unicode_literals + import subprocess try: @@ -191,12 +194,12 @@ class SCMRepoFactory(object): """ Returns a valid, usable object of type SCMRepository. """ if self.options.scm_mode == 'no': return SCMRepository(self.path_to_repo) - for glbl in globals().values(): + for glbl in list(globals().values()): try: if issubclass(glbl, SCMRepository): the_scm = glbl(self.path_to_repo) if the_scm.is_active(): - print 'Found SCM of type:', the_scm.handles_scm_type + print('Found SCM of type:', the_scm.handles_scm_type) return the_scm except (TypeError, AttributeError, InvalidSCMError): pass @@ -208,7 +211,7 @@ class SCMRepoFactory(object): """ Returns a valid, usable object of type SCMRepository for an unitialized dir. """ if self.options.scm_mode == 'no': return SCMRepository(self.path_to_repo) - for glbl in globals().values(): + for glbl in list(globals().values()): try: if issubclass(glbl, SCMRepository): if glbl.handles_scm_type == scm_type: -- cgit v1.2.3