summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-25 12:38:44 +0000
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-11-25 12:38:44 +0000
commit783eff350b3234aead7ba66b9d1ebb32848e67ad (patch)
tree58eb449535444d536212ac7936c04334ad6de54f
parent927e892dfc7eb7d8b8d9dff98e7f1756ad4e637b (diff)
downloadpykolab-783eff350b3234aead7ba66b9d1ebb32848e67ad.tar.gz
Move unlinking /tmp/kolab-setup-my.cnf from components to upper-level run call
-rw-r--r--pykolab/setup/__init__.py4
-rw-r--r--pykolab/setup/components.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/pykolab/setup/__init__.py b/pykolab/setup/__init__.py
index cffe6b4..a544e2a 100644
--- a/pykolab/setup/__init__.py
+++ b/pykolab/setup/__init__.py
@@ -40,3 +40,7 @@ class Setup(object):
def run(self):
components.execute('_'.join(to_execute))
+
+ if os.path.exists('/tmp/kolab-setup-my.cnf'):
+ os.unlink('/tmp/kolab-setup-my.cnf')
+
diff --git a/pykolab/setup/components.py b/pykolab/setup/components.py
index d280372..a51c416 100644
--- a/pykolab/setup/components.py
+++ b/pykolab/setup/components.py
@@ -201,9 +201,6 @@ def execute(component_name, *args, **kw):
components[component_name]['function'](conf.cli_args, kw)
- if os.path.exists('/tmp/kolab-setup-my.cnf'):
- os.unlink('/tmp/kolab-setup-my.cnf')
-
def register_group(dirname, module):
components_base_path = os.path.join(os.path.dirname(__file__), module)
@@ -266,4 +263,4 @@ def register(component_name, func, group=None, description=None, aliases=[], aft
def not_yet_implemented(*args, **kw):
print _("Not yet implemented")
- sys.exit(1) \ No newline at end of file
+ sys.exit(1)