]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
debian_build.py: Make legacy upload non-fatal.
authorBenjamin Drung <benjamin.drung@profitbricks.com>
Mon, 18 Aug 2014 08:47:13 +0000 (10:47 +0200)
committerBenjamin Drung <benjamin.drung@profitbricks.com>
Mon, 18 Aug 2014 08:47:13 +0000 (10:47 +0200)
debian_build.py

index 6d45a00a535103349ac56e67bceab40b34e85b6b..7e26cdd25cc4317bc1ad1b071552a6bbb6f2d8fb 100755 (executable)
@@ -764,25 +764,23 @@ if __name__ == '__main__':
                 changes = process.communicate()[0]
                 if process.returncode == 0:
                     logger.debug('%s succeeded.' % command)
-                else:
-                    logger.warn('%s failed.' % command)
-                    figlet('Legacy upload failed')
-                    exit_error()
-                (head, tail) = os.path.splitext(changes_file)
-                legacy_changes_file = os.path.abspath(head) + '_alexandria' + tail
-                filehandle = open(legacy_changes_file, 'w')
-                filehandle.write(changes)
-                filehandle.close()
 
-                dput_obj.configure()
-                dput_obj.upload(legacy_changes_file)
+                    (head, tail) = os.path.splitext(changes_file)
+                    legacy_changes_file = os.path.abspath(head) + '_alexandria' + tail
+                    filehandle = open(legacy_changes_file, 'w')
+                    filehandle.write(changes)
+                    filehandle.close()
 
-                figlet('Legacy upload OK')
+                    dput_obj.configure()
+                    dput_obj.upload(legacy_changes_file)
 
+                    figlet('Legacy upload OK')
+                else:
+                    logger.warn('%s failed.' % command)
+                    figlet('Legacy upload failed')
         except Exception as error:
             logger.error('Legacy upload failed. See above for details.', exc_info=error)
             figlet('Legacy upload failed')
-            exit_error()
 
     # .. define the time of completion
     BUILD_END = datetime.datetime.now()