summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2005-10-18 04:55:48 +0000
committerNarayan Desai <desai@mcs.anl.gov>2005-10-18 04:55:48 +0000
commit56b5eaa49b86d08b715d213b3de4889e0cd22ca6 (patch)
tree3b2de6d66e6fa468d2082f15b837bb3936c4fda7 /src
parentdfcfd8101836e1a4203f1cbe82e797971812ff0a (diff)
downloadbcfg2-56b5eaa49b86d08b715d213b3de4889e0cd22ca6.tar.gz
bcfg2-56b5eaa49b86d08b715d213b3de4889e0cd22ca6.tar.bz2
bcfg2-56b5eaa49b86d08b715d213b3de4889e0cd22ca6.zip
switch to new fam API
(Logical change 1.337) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@1388 ce84e21b-d406-0410-9b95-82705330c041
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()