From: Benjamin Drung Date: Mon, 18 Aug 2014 08:47:13 +0000 (+0200) Subject: debian_build.py: Make legacy upload non-fatal. X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=6242661fd95ee3a1bd25085bbd259240ff89d34f;p=profitbricks%2Fjenkins-build-scripts.git debian_build.py: Make legacy upload non-fatal. --- diff --git a/debian_build.py b/debian_build.py index 6d45a00..7e26cdd 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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()