summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-28 13:00:00 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2014-02-28 13:01:19 +0100
commitd12c31735e6726c503fd09e446cd4e2405ee8d7d (patch)
tree744604e9fffd770c197d0abddd8bea89b86d30bc
parent34ca3245f0ede2968a7f05d2aca108e79870ab70 (diff)
downloadpykolab-d12c31735e6726c503fd09e446cd4e2405ee8d7d.tar.gz
Fix indentation (#2872), fixing writing out amavisd (#2864)
Correct error message (#2868)
-rw-r--r--pykolab/setup/setup_mta.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index 64b3317..3b064c6 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -383,15 +383,18 @@ result_format = shared+%%s
t = Template(template_definition, searchList=[amavisd_settings])
+ fp = None
if os.path.isdir('/etc/amavisd'):
fp = open('/etc/amavisd/amavisd.conf', 'w')
elif os.path.isdir('/etc/amavis'):
fp = open('/etc/amavis/amavisd.conf', 'w')
+
+ if not fp == None:
fp.write(t.__str__())
fp.close()
else:
- log.error(_("Could not write out Amavis configuration file /etc/amavisd/amavisd.conf"))
+ log.error(_("Could not write out Amavis configuration file amavisd.conf"))
return
# On APT installations, /etc/amavis/conf.d/ is a directory with many more files.