X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=nodehistory.py;fp=nodehistory.py;h=abbcee8bb78f44df9b3245131c5086f5875b7e82;hb=c3f2afdc81c6711c3825c82e2cd4970671575438;hp=520037cae1c22044580b4c0d1025080abbf9c499;hpb=4b1825d8577cfd0266d8c4ac2254a96407e06112;p=monitor.git diff --git a/nodehistory.py b/nodehistory.py index 520037c..abbcee8 100755 --- a/nodehistory.py +++ b/nodehistory.py @@ -73,10 +73,9 @@ def pcu_print_info(pcuinfo, hostname): (reboot.pcu_name(pcuinfo), pcuinfo['username'], pcuinfo['password']) def main(): - from config import config - from optparse import OptionParser + import parser as parsermodule - parser = OptionParser() + parser = parsermodule.getParser() parser.set_defaults(node=None, fields='state', fromtime=None) parser.add_option("", "--node", dest="node", metavar="nodename.edu", help="A single node name to add to the nodegroup") @@ -84,8 +83,7 @@ def main(): help="Which record field to extract from all files.") parser.add_option("", "--fromtime", dest="fromtime", metavar="YYYY-MM-DD", help="Specify a starting date from which to begin the query.") - config = config(parser) - config.parse_args() + config = parsermodule.parse_args(parser) path = "archive-pdb" archive = database.SPickle(path)