]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
Fix crash when cleaning the repository fails.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Mon, 23 Dec 2013 14:40:40 +0000 (15:40 +0100)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Mon, 23 Dec 2013 14:40:40 +0000 (15:40 +0100)
subprocess.check_call will raise an exception instead of returning non-zero.

debian_build.py

index 53a33dd412181eccf6e9e8be69070e65d7972161..772f0d9e7913aeeb974fb956c8dbfbef0a66a97d 100755 (executable)
@@ -345,7 +345,7 @@ if __name__ == '__main__':
                 logger.info('Delete previous upstream tarball(s)')
                 cmd = [BIN_SUDO, BIN_RM] + files
                 command = ' '.join(cmd)
-                if subprocess.check_call(cmd) == 0:
+                if subprocess.call(cmd) == 0:
                     logger.debug('%s succeeded.' % command)
                 else:
                     logger.warn('%s failed.' % command)