summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sbin/Bcfg2debug16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/sbin/Bcfg2debug b/src/sbin/Bcfg2debug
index a1d163b1b..522baff0a 100644
--- a/src/sbin/Bcfg2debug
+++ b/src/sbin/Bcfg2debug
@@ -1,13 +1,14 @@
#!/usr/bin/env python
-
-__revision__ = '$Revision$'
'''This tool loads the Bcfg2 core into an interactive debugger'''
+__revision__ = '$Revision$'
+
from sys import argv
from time import sleep
from Bcfg2.Server.Core import Core, CoreInitError
-def input():
+def get_input():
+ '''read commands from stdin'''
try:
return raw_input('> ').split(" ")
except:
@@ -24,11 +25,10 @@ if __name__ == '__main__':
except CoreInitError, msg:
print "Core load failed because %s" % msg
raise SystemExit, 1
- while core.fam.fm.pending():
- while core.fam.fm.pending():
- core.fam.HandleEvent()
+ for i in range(25):
+ core.fam.Service()
sleep(0.5)
- cmd = input()
+ cmd = get_input()
while cmd != ['']:
if cmd[0] in ['exit', 'quit']:
raise SystemExit, 0
@@ -70,4 +70,4 @@ if __name__ == '__main__':
sleep(0.5)
else:
print "Unknown command %s" % cmd[0]
- cmd = input()
+ cmd = get_input()