summaryrefslogtreecommitdiffstats
path: root/src/sbin/bcfg2-info
diff options
context:
space:
mode:
Diffstat (limited to 'src/sbin/bcfg2-info')
-rwxr-xr-xsrc/sbin/bcfg2-info8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index 72e6c42e0..4f7228c8e 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -2,7 +2,7 @@
'''This tool loads the Bcfg2 core into an interactive debugger'''
__revision__ = '$Revision$'
-import copy, logging, lxml.etree, sys, cmd, tempfile
+import copy, logging, lxml.etree, sys, cmd
import Bcfg2.Logger, Bcfg2.Server.Core, os
import Bcfg2.Server.Plugins.Metadata, Bcfg2.Server.Plugin
import Bcfg2.Options
@@ -317,15 +317,13 @@ if __name__ == '__main__':
'-d' in sys.argv, [])
else:
import hotshot, hotshot.stats
- pfd, pfile = tempfile.mkstemp()
- prof = hotshot.Profile(pfile)
+ prof = hotshot.Profile(setup['profile'])
try:
prof.runcall(main, setup['repo'], setup['plugins'], setup['password'],
setup['encoding'], '-d' in sys.argv, ['exit'])
except SystemExit:
- stats = hotshot.stats.load(pfile)
+ stats = hotshot.stats.load(setup['profile'])
stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(80)
- print pfile
raise