summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorAndrew Brestick <brestick@mcs.anl.gov>2008-07-14 19:01:27 +0000
committerAndrew Brestick <brestick@mcs.anl.gov>2008-07-14 19:01:27 +0000
commitc10f4de0b0f71dd8e0cf794ece1773e0e6c08eec (patch)
tree0b4a60c6dc1395b294840f1b11a567ad17f43de6 /src/sbin
parent70b4dff4e62b0611db8687c3f0a124db99f5f8ed (diff)
downloadbcfg2-c10f4de0b0f71dd8e0cf794ece1773e0e6c08eec.tar.gz
bcfg2-c10f4de0b0f71dd8e0cf794ece1773e0e6c08eec.tar.bz2
bcfg2-c10f4de0b0f71dd8e0cf794ece1773e0e6c08eec.zip
added event debugging on load with -d option
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4781 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-info19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index 9cffc8719..eb65378d0 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -23,10 +23,14 @@ def printTabular(rows):
print fstring % row
class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core):
- def __init__(self, repo, struct, gens, passwd, svn, encoding):
+
+ def __init__(self, repo, struct, gens, passwd, svn, encoding, event_debug):
cmd.Cmd.__init__(self)
try:
- Bcfg2.Server.Core.Core.__init__(self, repo, struct, gens, passwd, svn, encoding)
+ Bcfg2.Server.Core.Core.__init__(self, repo, struct, gens,
+ passwd, svn, encoding)
+ if event_debug:
+ self.fam.debug = True
except Bcfg2.Server.Core.CoreInitError, msg:
print "Core load failed because %s" % msg
raise SystemExit(1)
@@ -272,13 +276,16 @@ if __name__ == '__main__':
'structures': Bcfg2.Options.SERVER_STRUCTURES,
'generators': Bcfg2.Options.SERVER_GENERATORS,
'password': Bcfg2.Options.SERVER_PASSWORD,
+ 'event debug': Bcfg2.Options.DEBUG,
'encoding': Bcfg2.Options.ENCODING})
setup = Bcfg2.Options.OptionParser(optinfo)
setup.parse(sys.argv[1:])
-
- loop = infoCore(setup['repo'], setup['structures'], setup['generators'],
- setup['password'], setup['svn'], setup['encoding'])
- loop.plugins['Metadata']
+ if "-d" in sys.argv:
+ loop = infoCore(setup['repo'], setup['structures'], setup['generators'],
+ setup['password'], setup['svn'], setup['encoding'], True)
+ else:
+ loop = infoCore(setup['repo'], setup['structures'], setup['generators'],
+ setup['password'], setup['svn'], setup['encoding'], False)
if "args" in setup and setup['args']:
loop.onecmd(" ".join(setup['args']))
raise SystemExit(0)