summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Klos <kolab@klos2day.nl>2012-10-24 09:14:42 -0400
committerPaul Klos <kolab@klos2day.nl>2012-10-24 09:14:42 -0400
commit36b801c0a9deab721e63abcb35c9a60609e3a673 (patch)
tree9c2ac54db9be080ebcf132e475d29c6f3e25bd39
parent4ef657abbb86deb765f3eaf49fcce73ea0425cc1 (diff)
downloadpykolab-36b801c0a9deab721e63abcb35c9a60609e3a673.tar.gz
Corrected indentation
-rw-r--r--pykolab/setup/setup_ldap.py30
-rw-r--r--pykolab/setup/setup_mta.py36
-rw-r--r--pykolab/setup/setup_roundcube.py12
3 files changed, 39 insertions, 39 deletions
diff --git a/pykolab/setup/setup_ldap.py b/pykolab/setup/setup_ldap.py
index ee3db85..325cbcf 100644
--- a/pykolab/setup/setup_ldap.py
+++ b/pykolab/setup/setup_ldap.py
@@ -111,26 +111,26 @@ def execute(*args, **kw):
""")
)
- try:
- pw = pwd.getpwnam("dirsrv")
- except:
- _input['userid'] = utils.ask_question(_("User"), default="nobody")
- _input['group'] = utils.ask_question(_("Group"), default="nobody")
- else:
- _input['userid'] = utils.ask_question(_("User"), default="dirsrv")
- _input['group'] = utils.ask_question(_("Group"), default="dirsrv")
+ try:
+ pw = pwd.getpwnam("dirsrv")
+ except:
+ _input['userid'] = utils.ask_question(_("User"), default="nobody")
+ _input['group'] = utils.ask_question(_("Group"), default="nobody")
+ else:
+ _input['userid'] = utils.ask_question(_("User"), default="dirsrv")
+ _input['group'] = utils.ask_question(_("Group"), default="dirsrv")
else:
_input['admin_pass'] = conf.get('ldap', 'bind_pw')
_input['dirmgr_pass'] = conf.get('ldap', 'bind_pw')
try:
- pw = pwd.getpwnam("dirsrv")
- except:
- _input['userid'] = "nobody"
- _input['group'] = "nobody"
- else:
- _input['userid'] = "dirsrv"
- _input['group'] = "dirsrv"
+ pw = pwd.getpwnam("dirsrv")
+ except:
+ _input['userid'] = "nobody"
+ _input['group'] = "nobody"
+ else:
+ _input['userid'] = "dirsrv"
+ _input['group'] = "dirsrv"
# TODO: Verify the user and group exist.
diff --git a/pykolab/setup/setup_mta.py b/pykolab/setup/setup_mta.py
index fb3a2ad..862c789 100644
--- a/pykolab/setup/setup_mta.py
+++ b/pykolab/setup/setup_mta.py
@@ -211,10 +211,10 @@ result_attribute = mail
if not os.path.isfile('/etc/postfix/main.cf'):
if os.path.isfile('/usr/share/postfix/main.cf.debian'):
- shutil.copy(
- '/usr/share/postfix/main.cf.debian',
- '/etc/postfix/main.cf'
- )
+ shutil.copy(
+ '/usr/share/postfix/main.cf.debian',
+ '/etc/postfix/main.cf'
+ )
myaugeas = Augeas()
@@ -289,10 +289,10 @@ result_attribute = mail
fp.close()
t = Template(template_definition, searchList=[amavisd_settings])
- 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 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')
fp.write(t.__str__())
fp.close()
@@ -306,19 +306,19 @@ result_attribute = mail
# while really it isn't required.
else:
log.info(_("Not writing out any configuration for Amavis."))
- # On debian wheezy amavisd-new expects '/etc/mailname' - possibly remediable through
- # the #1080 enhancement mentioned above, but here's a quick fix.
- f = open('/etc/mailname','w')
+ # On debian wheezy amavisd-new expects '/etc/mailname' - possibly remediable through
+ # the #1080 enhancement mentioned above, but here's a quick fix.
+ f = open('/etc/mailname','w')
f.writelines(conf.get('kolab', 'primary_domain'))
- f.close()
+ f.close()
if os.path.isfile('/etc/default/spamassassin'):
- myaugeas = Augeas()
- setting = os.path.join('/files/etc/default/spamassassin','ENABLED')
- if not myaugeas.get(setting) == '1':
- myaugeas.set(setting,'1')
- myaugeas.save()
- myaugeas.close()
+ myaugeas = Augeas()
+ setting = os.path.join('/files/etc/default/spamassassin','ENABLED')
+ if not myaugeas.get(setting) == '1':
+ myaugeas.set(setting,'1')
+ myaugeas.save()
+ myaugeas.close()
if os.path.isfile('/bin/systemctl'):
subprocess.call(['systemctl', 'restart', 'postfix.service'])
diff --git a/pykolab/setup/setup_roundcube.py b/pykolab/setup/setup_roundcube.py
index 7810393..19ebd01 100644
--- a/pykolab/setup/setup_roundcube.py
+++ b/pykolab/setup/setup_roundcube.py
@@ -122,10 +122,10 @@ def execute(*args, **kw):
_("Successfully compiled template %r, writing out to %r") % (template_file, want_file),
level=8
)
- if os.path.isdir('/etc/roundcubemail'):
- fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
- elif os.path.isdir('/etc/roundcube'):
- fp = open('/etc/roundcube/%s' % (want_file), 'w')
+ if os.path.isdir('/etc/roundcubemail'):
+ fp = open('/etc/roundcubemail/%s' % (want_file), 'w')
+ elif os.path.isdir('/etc/roundcube'):
+ fp = open('/etc/roundcube/%s' % (want_file), 'w')
fp.write(t.__str__())
fp.close()
@@ -143,9 +143,9 @@ def execute(*args, **kw):
schema_files.append(schema_filepath)
if os.path.isdir('/usr/share/roundcubemail'):
- rcpath = '/usr/share/roundcubemail/'
+ rcpath = '/usr/share/roundcubemail/'
elif os.path.isdir('/usr/share/roundcube'):
- rcpath = '/usr/share/roundcube/'
+ rcpath = '/usr/share/roundcube/'
for root, directories, filenames in os.walk(rcpath + 'plugins/calendar/drivers/kolab/'):
for filename in filenames:
if filename.startswith('mysql') and filename.endswith('.sql'):