diff options
author | Rob Austein <sra@hactrn.net> | 2007-11-13 20:22:57 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-11-13 20:22:57 +0000 |
commit | 222dcc75375bed4627b1bb66c449cb78a2588771 (patch) | |
tree | 40949241c9b752b80704e75af04354db6444543e /scripts/test-pow.py | |
parent | e40bf7a235cd7e1a644c8b90d9c268ace845babe (diff) |
Replace horrible profusion of tuples of resource sets with a new
wrapper abstraction.
svn path=/scripts/biz-certs/Bob-CA.srl; revision=1281
Diffstat (limited to 'scripts/test-pow.py')
-rw-r--r-- | scripts/test-pow.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/test-pow.py b/scripts/test-pow.py index f371cc46..06827995 100644 --- a/scripts/test-pow.py +++ b/scripts/test-pow.py @@ -80,10 +80,10 @@ for der in (alice, apnic): print " Crit: ", crit print " Value:", val print - as, v4, v6 = rpki.resource_set.parse_extensions(cert.getExtensions()) - if as: print ",".join(map(lambda x: "AS:" + str(x), as)) - if v4: print ",".join(map(lambda x: "IPv4:" + str(x), v4)) - if v6: print ",".join(map(lambda x: "IPv6:" + str(x), v6)) - if as is not None: print as.to_tuple() - if v4 is not None: print v4.to_tuple() - if v6 is not None: print v6.to_tuple() + bag = rpki.resource_set.parse_extensions(cert.getExtensions()) + if bag.as: print ",".join(map(lambda x: "AS:" + str(x), bag.as)) + if bag.v4: print ",".join(map(lambda x: "IPv4:" + str(x), bag.v4)) + if bag.v6: print ",".join(map(lambda x: "IPv6:" + str(x), bag.v6)) + if bag.as is not None: print bag.as.to_tuple() + if bag.v4 is not None: print bag.v4.to_tuple() + if bag.v6 is not None: print bag.v6.to_tuple() |