summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Admin.py')
-rw-r--r--src/lib/Bcfg2/Server/Admin.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/Bcfg2/Server/Admin.py b/src/lib/Bcfg2/Server/Admin.py
index ef7741880..c294e6be5 100644
--- a/src/lib/Bcfg2/Server/Admin.py
+++ b/src/lib/Bcfg2/Server/Admin.py
@@ -1198,7 +1198,9 @@ class CLI(Bcfg2.Options.CommandRegistry):
def run(self):
""" Run bcfg2-admin """
try:
- self.commands[Bcfg2.Options.setup.subcommand].setup()
+ cmd = self.commands[Bcfg2.Options.setup.subcommand]
+ if hasattr(cmd, 'setup'):
+ cmd.setup()
return self.runcommand()
finally:
self.shutdown()