summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Info.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server/Info.py')
-rw-r--r--src/lib/Bcfg2/Server/Info.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/Bcfg2/Server/Info.py b/src/lib/Bcfg2/Server/Info.py
index 0baa29a9f..da2312cc8 100644
--- a/src/lib/Bcfg2/Server/Info.py
+++ b/src/lib/Bcfg2/Server/Info.py
@@ -837,7 +837,6 @@ class InfoCore(cmd.Cmd, Bcfg2.Server.Core.Core):
pass
def shutdown(self):
- Bcfg2.Options.CommandRegistry.shutdown(self)
Bcfg2.Server.Core.Core.shutdown(self)
@@ -868,6 +867,9 @@ class CLI(Bcfg2.Options.CommandRegistry):
def run(self):
""" Run bcfg2-info """
- if Bcfg2.Options.setup.subcommand != 'help':
- self.core.run()
- return self.runcommand()
+ try:
+ if Bcfg2.Options.setup.subcommand != 'help':
+ self.core.run()
+ return self.runcommand()
+ finally:
+ self.shutdown()