]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
fix DIST
authorHolger Levsen <holger@layer-acht.org>
Tue, 25 Oct 2011 18:37:17 +0000 (20:37 +0200)
committerHolger Levsen <holger@layer-acht.org>
Tue, 25 Oct 2011 18:37:17 +0000 (20:37 +0200)
debian_build.py

index 8e50abd5f95e4de64f5f72b86a8497b8ff47de63..cb6e2ad387403dfb8f47596a01d03847592600db 100755 (executable)
@@ -485,20 +485,16 @@ if __name__ == '__main__':
             time.sleep(60) # give reprepro time to process
             FLAVOURS_FILE=os.path.join(GIT_TARGET_WORKSPACE, GIT_REPO_NAME, "debian/pb_flavours")
             fh = open(FLAVOURS_FILE, 'r')
-            for flavour in fh.read():
+            for flavour in fh():
                 cmd = ['%s' % os.path.join(CWD, "build-oot.sh"),
                        '%s' % JOB_NAME,
                        '%s' % flavour,
-                       '%s' % options.distribution,
+                       '%s' % os.environ.get('DIST'),
                        '%s' % pb_suite ]
                 logger.info('calling "%s" ...', ' '.join(cmd))
                 ret = os.system('%s' %(' '.join(cmd)))
                 if ret:
-                    logger_loud_error(
-                        '"%s" returned non-zero (exitcode was: %s).',
-                        ' '.join(cmd),
-                        ret,
-                    )
+                    logger_loud_error('"%s" returned non-zero (exitcode was: %s).' % (' '.join(cmd), ret))
             fh.close()
             exit_ok()
         except Exception, error: