Packaging cleanup: normalize print calls.
Namely: use default arguments instead of explicit empty string; use multiple
arguments instead of building strings.
diff --git a/Lib/packaging/depgraph.py b/Lib/packaging/depgraph.py
index 48ea3d9..9f3d6c3 100644
--- a/Lib/packaging/depgraph.py
+++ b/Lib/packaging/depgraph.py
@@ -236,7 +236,9 @@
except Exception as e:
tempout.seek(0)
tempout = tempout.read()
- print('Could not generate the graph\n%s\n%s\n' % (tempout, e))
+ print('Could not generate the graph')
+ print(tempout)
+ print(e)
sys.exit(1)
for dist, reqs in graph.missing.items():
@@ -246,7 +248,7 @@
# XXX replace with argparse
if len(sys.argv) == 1:
print('Dependency graph:')
- print(' ' + repr(graph).replace('\n', '\n '))
+ print(' ', repr(graph).replace('\n', '\n '))
sys.exit(0)
elif len(sys.argv) > 1 and sys.argv[1] in ('-d', '--dot'):
if len(sys.argv) > 2: