Skip to content

Commit 439572d

Browse files
committed
show ongoing retrieval
1 parent 5a046e6 commit 439572d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

git_sym.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ def shell(cmd):
3636
"""
3737
log("!%s" %cmd)
3838
return subprocess.check_output(cmd, shell=True) #TODO: Allow python2.6?
39+
def system(cmd):
40+
"""Run cmd as a system-call.
41+
Raise Exception on any error.
42+
"""
43+
log(cmd)
44+
rc = os.system(cmd)
45+
if rc:
46+
raise Exception('%d <- %r' %(rc, cmd))
3947
def make_dirs(d):
4048
log("makedirs(%s)" %d)
4149
if not os.path.exists(d):
@@ -219,7 +227,7 @@ def retrieve_using_make(makefilename, paths):
219227
cmd = "make -j -f %s %s" %(
220228
makefilename,
221229
' '.join("'%s'"%p for p in a_few))
222-
shell(cmd)
230+
system(cmd)
223231
def retrieve(paths):
224232
debug("retrieve: %r" %paths)
225233
if not paths:

0 commit comments

Comments
 (0)