From 4d3f9a9164640d0b4f01ef80cf3a10cb1c7bd6cf Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 12 Mar 2015 19:52:37 +0100 Subject: reproducible: make more robust --- bin/reproducible_scheduler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/reproducible_scheduler.py b/bin/reproducible_scheduler.py index 96a8ffb6..bdc757f3 100755 --- a/bin/reproducible_scheduler.py +++ b/bin/reproducible_scheduler.py @@ -297,7 +297,10 @@ if __name__ == '__main__': log.info('Updating schroots for all suites.') for suite in SUITES: call_apt_update(suite) - overall = int(query_db('SELECT count(*) FROM schedule')[0][0]) + try: + overall = int(query_db('SELECT count(*) FROM schedule')[0][0]) + except: + overall = 9999 if overall > 250: log.info(str(overall) + ' packages already scheduled, nothing to do.') sys.exit() @@ -305,5 +308,3 @@ if __name__ == '__main__': for suite in SUITES: update_sources_tables(suite) scheduler() - overall = int(query_db('SELECT count(*) FROM schedule')[0][0]) - log.info(str(overall) + ' packages scheduled at the end, in all suites.') -- cgit v1.2.3-70-g09d2