From: Niels Thykier Date: Tue, 29 Dec 2015 22:02:40 +0000 (+0000) Subject: dominate: Do not open log files with -n X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=f35892c66f10c6f072cc097519b0da05c63e1ee2;p=dak.git dominate: Do not open log files with -n Signed-off-by: Niels Thykier --- diff --git a/dak/dominate.py b/dak/dominate.py index 449b9595..accb0df8 100755 --- a/dak/dominate.py +++ b/dak/dominate.py @@ -140,7 +140,8 @@ def main(): suites = [suite.suite_name for suite in query_suites] cnf['Obsolete::Options::Suite'] = str(','.join(suites)) - Logger = daklog.Logger("dominate") + if not Options['No-Action']: + Logger = daklog.Logger("dominate") session = DBConn().session() for suite_name in utils.split_args(Options['Suite']): suite = session.query(Suite).filter_by(suite_name = suite_name).one() @@ -156,7 +157,8 @@ def main(): session.rollback() else: session.commit() - Logger.close() + if Logger: + Logger.close() if __name__ == '__main__': main()