From f35892c66f10c6f072cc097519b0da05c63e1ee2 Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Tue, 29 Dec 2015 22:02:40 +0000 Subject: [PATCH] dominate: Do not open log files with -n Signed-off-by: Niels Thykier --- dak/dominate.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() -- 2.39.5