X-Git-Url: http://git.onelab.eu/?p=monitor.git;a=blobdiff_plain;f=findbadpcu.py;h=55422a30231f5cd71e3772517524aecacec177c3;hp=de4474bec1249fc80b722653714caa8489f9fb8c;hb=944d143a6528c4157b71f51ed480aec806cbaa06;hpb=94cd174f6ce0bb3b2c8bceda0346e332037c6d8a diff --git a/findbadpcu.py b/findbadpcu.py index de4474b..55422a3 100755 --- a/findbadpcu.py +++ b/findbadpcu.py @@ -404,9 +404,8 @@ if __name__ == '__main__': formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s') fh.setFormatter(formatter) logger.addHandler(fh) - from config import config - from optparse import OptionParser - parser = OptionParser() + import parser as parsermodule + parser = parsermodule.getParser() parser.set_defaults(nodelist=None, increment=False, pcuid=None, @@ -426,8 +425,8 @@ if __name__ == '__main__': help="Refresh the cached values") parser.add_option("-i", "--increment", action="store_true", dest="increment", help="Increment round number to force refresh or retry") - config = config(parser) - config.parse_args() + parser = parsermodule.getParser(['defaults'], parser) + config = parsermodule.parse_args(parser) try: # NOTE: evidently, there is a bizarre interaction between iLO and ssh # when LANG is set... Do not know why. Unsetting LANG, fixes the problem.