diff options
Diffstat (limited to 'src/sbin/bcfg2-info')
-rwxr-xr-x | src/sbin/bcfg2-info | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info index 4412c712a..c73efa23e 100755 --- a/src/sbin/bcfg2-info +++ b/src/sbin/bcfg2-info @@ -103,11 +103,11 @@ def displayTrace(trace, num=80, sort=('time', 'calls')): class infoCore(cmd.Cmd, Bcfg2.Server.Core.Core): """Main class for bcfg2-info.""" - def __init__(self, repo, plgs, passwd, encoding, event_debug): + def __init__(self, repo, plgs, passwd, encoding, event_debug, filemonitor='default'): cmd.Cmd.__init__(self) try: Bcfg2.Server.Core.Core.__init__(self, repo, plgs, passwd, - encoding) + encoding, filemonitor=filemonitor) if event_debug: self.fam.debug = True except Bcfg2.Server.Core.CoreInitError: @@ -518,20 +518,23 @@ if __name__ == '__main__': 'logging': Bcfg2.Options.LOGGING_FILE_PATH }) setup = Bcfg2.Options.OptionParser(optinfo) + setup.hm = "Usage:\n %s\n%s" % (setup.buildHelpMessage(), + USAGE) + setup.parse(sys.argv[1:]) if setup['args'] and setup['args'][0] == 'help': - print(USAGE) + print(setup.hm) sys.exit(0) elif setup['profile'] and have_profile: prof = profile.Profile() loop = prof.runcall(infoCore, setup['repo'], setup['plugins'], setup['password'], setup['encoding'], - setup['event debug']) + setup['event debug'], setup['filemonitor']) displayTrace(prof) else: if setup['profile']: print("Profiling functionality not available.") loop = infoCore(setup['repo'], setup['plugins'], setup['password'], - setup['encoding'], setup['event debug']) + setup['encoding'], setup['event debug'], setup['filemonitor']) loop.Run(setup['args']) |