Skip to content

Commit 4bb7b14

Browse files
authored
Merge pull request chubin#309 from chubin/outputfix
Fix chubin#307 error reporting on fetch failures
2 parents a18e6d8 + b918a33 commit 4bb7b14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/fetch.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ def _fetch_locations(known_location):
5757
sys.stdout.write("Fetching %s..." % (adptr))
5858
sys.stdout.flush()
5959
try:
60-
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
60+
process = subprocess.Popen(
61+
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
62+
universal_newlines=True)
6163
except OSError:
6264
print("\nERROR: %s" % cmd)
6365
raise
@@ -89,6 +91,7 @@ def _fetch_locations(known_location):
8991
if os.path.exists(location):
9092
if skip_existing:
9193
existing_locations.append(location)
94+
print("Already exists %s" % (location))
9295
else:
9396
fatal("%s already exists" % location)
9497

0 commit comments

Comments
 (0)