diff options
author | Rob Austein <sra@hactrn.net> | 2016-04-26 20:07:50 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-04-26 20:07:50 +0000 |
commit | 89245def44ce5d2f7fbf665155b42794484c507d (patch) | |
tree | 862fb232cf7badd11b3bcd75a11d52c4c8e40690 /rp/utils/scan_roas | |
parent | 2e0f5147b3099b6b584ec302be7f0818aad969f0 (diff) |
Convert RP utilities to use common config/argparse/logging setup.
svn path=/branches/tk705/; revision=6392
Diffstat (limited to 'rp/utils/scan_roas')
-rwxr-xr-x | rp/utils/scan_roas | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/rp/utils/scan_roas b/rp/utils/scan_roas index 740d6628..510fd7a0 100755 --- a/rp/utils/scan_roas +++ b/rp/utils/scan_roas @@ -24,6 +24,8 @@ per line. import os import argparse + +import rpki.config import rpki.POW from rpki.rcynicdb.iterator import authenticated_objects @@ -48,10 +50,10 @@ class ROA(rpki.POW.ROA): # pylint: disable=W0232 # pylint: disable=E1101 return "%s %s %s" % (self.signingTime(), self.getASID(), " ".join(self.prefixes)) -parser = argparse.ArgumentParser(description = __doc__) -parser.add_argument("rcynic_dir", nargs = "?", type = check_dir, - help = "rcynic authenticated output directory") -args = parser.parse_args() +cfg = rpki.config.argparser(doc = __doc__) +cfg.argparser.add_argument("rcynic_dir", nargs = "?", type = check_dir, + help = "rcynic authenticated output directory") +args = cfg.argparser.parse_args() for uri, roa in authenticated_objects(args.rcynic_dir, uri_suffix = ".roa", |