From abe6a5fef3a4f06ddee2f1f37f95362c54fb239b Mon Sep 17 00:00:00 2001 From: Anders Ingemann Date: Sun, 15 Dec 2013 19:23:56 +0100 Subject: [PATCH] Don't save the logger to a var we only use once --- common/tasks/initd.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/tasks/initd.py b/common/tasks/initd.py index 7bd5a14..5e52288 100644 --- a/common/tasks/initd.py +++ b/common/tasks/initd.py @@ -52,7 +52,9 @@ class AddSSHKeyGeneration(Task): else: install['generate-ssh-hostkeys'] = os.path.join(init_scripts_dir, 'generate-ssh-hostkeys') except CalledProcessError: - pass + import logging + logging.getLogger(__name__).warn('The OpenSSH server has not been installed, ' + 'not installing SSH host key generation script.') class RemoveHWClock(Task):