summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2011-06-24 12:25:17 -0400
committerShaun McCance <shaunm@gnome.org>2011-06-24 13:29:55 -0400
commite84f296dd21de75b9244896be9d2acc6aeed4dea (patch)
tree0285500589da8372d51c51dc086b1da319419c07
parentb13436f2a75ffded500e5f26028237d337510394 (diff)
downloaditstool-e84f296dd21de75b9244896be9d2acc6aeed4dea.tar.gz
Fixes for Python 3
-rwxr-xr-xitstool.in2
-rw-r--r--tests/run_tests.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/itstool.in b/itstool.in
index 771dac5..229cfd1 100755
--- a/itstool.in
+++ b/itstool.in
@@ -866,7 +866,7 @@ if __name__ == '__main__':
(opts, args) = options.parse_args(sys.argv)
if opts.version:
- print 'itstool ' + VERSION
+ print('itstool %s' % VERSION)
sys.exit(0)
if opts.merge is None:
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 08a9aa1..21c594f 100644
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -18,7 +18,7 @@ class ItstoolTests(unittest.TestCase):
""" Helper method to run a shell command """
# Set stdout = sys.stdout to debug a subprocess if you set a breakpoint in it
pipe = Popen(cmd, shell=True, env=os.environ, stdin=None, stdout=PIPE, stderr=PIPE)
- (output, errout) = pipe.communicate()
+ (output, errout) = map(lambda x:x.decode(), pipe.communicate())
status = pipe.returncode
self.assertEqual(status, 0, errout or output)
return (status, output, errout)