summaryrefslogtreecommitdiff
path: root/bin/scons-diff.py
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 13:15:47 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-10-01 13:15:47 +0200
commitb0c36cefa1e0a4bf99681aade9e26ac6aa1ef903 (patch)
treed63dc2036a39e716daf18e3c915fafb2fcba6674 /bin/scons-diff.py
parent6be31f5d140b81227911cabfc61d3802c76c1b61 (diff)
parenta5d26f7b62414ed38e1815a49a864b15df2e9694 (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'bin/scons-diff.py')
-rw-r--r--bin/scons-diff.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/bin/scons-diff.py b/bin/scons-diff.py
index 1e4bca0..182b726 100644
--- a/bin/scons-diff.py
+++ b/bin/scons-diff.py
@@ -8,6 +8,7 @@
# etc. so that you can diff trees without having to ignore changes in
# version lines.
#
+from __future__ import print_function
import difflib
import getopt
@@ -43,7 +44,7 @@ def diff_line(left, right):
opts = ' ' + ' '.join(diff_options)
else:
opts = ''
- print 'diff%s %s %s' % (opts, left, right)
+ print('diff%s %s %s' % (opts, left, right))
for o, a in opts:
if o in ('-c', '-u'):
@@ -51,7 +52,7 @@ for o, a in opts:
context = int(a)
diff_options.append(o)
elif o in ('-h', '--help'):
- print Usage
+ print(Usage)
sys.exit(0)
elif o in ('-n'):
diff_options.append(o)
@@ -161,9 +162,9 @@ def diff_file(left, right):
else:
if text:
diff_line(left, right)
- print text,
+ print(text)
elif report_same:
- print 'Files %s and %s are identical' % (left, right)
+ print('Files %s and %s are identical' % (left, right))
def diff_dir(left, right):
llist = os.listdir(left)
@@ -173,16 +174,16 @@ def diff_dir(left, right):
u[l] = 1
for r in rlist:
u[r] = 1
- for x in sorted([ x for x in u.keys() if x[-4:] != '.pyc' ]):
+ for x in sorted([ x for x in list(u.keys()) if x[-4:] != '.pyc' ]):
if x in llist:
if x in rlist:
do_diff(os.path.join(left, x),
os.path.join(right, x),
recursive)
else:
- print 'Only in %s: %s' % (left, x)
+ print('Only in %s: %s' % (left, x))
else:
- print 'Only in %s: %s' % (right, x)
+ print('Only in %s: %s' % (right, x))
do_diff(left, right, True)