chiark
/
gitweb
/
~mdw
/
chopwood
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
9424c48
)
agpl.py (filez): Check the exit code from the command.
author
Mark Wooding
<mdw@distorted.org.uk>
Thu, 28 Mar 2013 00:02:38 +0000
(
00:02
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 28 Mar 2013 00:13:51 +0000
(
00:13
+0000)
agpl.py
patch
|
blob
|
blame
|
history
diff --git
a/agpl.py
b/agpl.py
index 41ee3762f24298d8275ffc50a40b032f47a71c60..b49153b4e8fea57cd91fbfaaac0631fdec5b812c 100644
(file)
--- a/
agpl.py
+++ b/
agpl.py
@@
-149,6
+149,15
@@
def filez(cmd):
## Whatever's left over will be dealt with next time through.
left = buf[i:]
+ ## Make sure the command actually completed successfully.
+ if kid.wait():
+ rc = kid.returncode
+ raise U.ExpectedError, \
+ (500, "lister command `%s' failed (%s) in `%s'" % (
+ cmd,
+ (rc & 0xff00) and 'rc = %d' % (rc >> 8) or 'signal %d' % rc,
+ dir))
+
## If there's trailing junk left over then we should complain.
if left:
raise U.ExpectedError, \