mirror of
https://github.com/chubin/cheat.sh.git
synced 2026-06-20 13:16:44 +02:00
Merge pull request #309 from chubin/outputfix
Fix #307 error reporting on fetch failures
This commit is contained in:
+4
-1
@@ -57,7 +57,9 @@ def fetch_all(skip_existing=True):
|
||||
sys.stdout.write("Fetching %s..." % (adptr))
|
||||
sys.stdout.flush()
|
||||
try:
|
||||
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||
process = subprocess.Popen(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
|
||||
universal_newlines=True)
|
||||
except OSError:
|
||||
print("\nERROR: %s" % cmd)
|
||||
raise
|
||||
@@ -89,6 +91,7 @@ def fetch_all(skip_existing=True):
|
||||
if os.path.exists(location):
|
||||
if skip_existing:
|
||||
existing_locations.append(location)
|
||||
print("Already exists %s" % (location))
|
||||
else:
|
||||
fatal("%s already exists" % location)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user