summaryrefslogtreecommitdiff
path: root/gr-utils/python/modtool/scm.py
diff options
context:
space:
mode:
authorMarcus Müller <marcus@hostalia.de>2018-06-25 19:28:29 +0200
committerMarcus Müller <marcus@hostalia.de>2018-06-25 19:28:29 +0200
commit03ae7938351f01313d30a41927ffb77670fcca14 (patch)
tree586744f0e2b7560dc161f2a7a60030155d43ce8a /gr-utils/python/modtool/scm.py
parentd78f7fcd0dadd362fcdc99194da5343a506eb519 (diff)
parentc66aec4dfae559004e88da968d1ce57584e144ee (diff)
Merge branch 'next_python3' into next
This brings Python3 to `next`. It also brings * a bump in SWIG dependency version * various GRC improvements, * YAML instead of XML in GRC * a lot of broken unit tests
Diffstat (limited to 'gr-utils/python/modtool/scm.py')
-rw-r--r--gr-utils/python/modtool/scm.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/gr-utils/python/modtool/scm.py b/gr-utils/python/modtool/scm.py
index 9b0ef7db5e..5e80e24994 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 uninitialized 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: