diff options
author | Rob Austein <sra@hactrn.net> | 2007-08-24 18:36:40 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-08-24 18:36:40 +0000 |
commit | df8ef2b9ce3384ae05319f779c1d11b81ff65235 (patch) | |
tree | fe6e3b1d2e37ba6631812d8a2b87025764998df7 | |
parent | 394c034dedeb82ef283c35c911b53e735c05560c (diff) |
Cleanup
svn path=/scripts/irbe-cli.py; revision=905
-rwxr-xr-x | scripts/irbe-cli.py | 12 | ||||
-rw-r--r-- | scripts/test-sql.py | 2 |
2 files changed, 9 insertions, 5 deletions
diff --git a/scripts/irbe-cli.py b/scripts/irbe-cli.py index 0320967b..a21da4b3 100755 --- a/scripts/irbe-cli.py +++ b/scripts/irbe-cli.py @@ -6,7 +6,8 @@ This only handles the control channel. The query back-channel will be a separate program. """ -import glob, rpki.left_right, rpki.relaxng, getopt, sys, lxml.etree, POW.pkix, rpki.cms, rpki.https, xml.sax, lxml.sax, rpki.x509 +import glob, getopt, sys, lxml.etree, POW.pkix, xml.sax, lxml.sax +import rpki.left_right, rpki.relaxng, rpki.cms, rpki.https, rpki.x509 # Kludge around current test setup all being PEM rather than DER format convert_from_pem = True @@ -30,7 +31,7 @@ class command(object): def getopt(self, argv): """Parse options for this class.""" - opts, args = getopt.getopt(argv, "", [x + "=" for x in self.attributes + self.elements] + [x for x in self.booleans]) + opts, args = getopt.getopt(argv, "", [x + "=" for x in self.attributes + self.elements] + self.booleans) for o, a in opts: o = o[2:] handler = getattr(self, "handle_" + o, None) @@ -116,7 +117,9 @@ dispatch = dict((x.element_name, x) for x in (self, bsc, parent, child, reposito def usage(): print "Usage:", sys.argv[0] for k,v in dispatch.iteritems(): - print " ", k, " ".join(["--" + x + "=" for x in v.attributes + v.elements]), " ".join(["--" + x for x in v.booleans]) + print " ", k, \ + " ".join(["--" + x + "=" for x in v.attributes + v.elements]), \ + " ".join(["--" + x for x in v.booleans]) sys.exit(1) def main(): @@ -157,7 +160,8 @@ def main(): print q_xml - q_cms = rpki.cms.encode(q_xml, "biz-certs/Alice-EE.key", ("biz-certs/Alice-EE.cer", "biz-certs/Alice-CA.cer")) + q_cms = rpki.cms.encode(q_xml, "biz-certs/Alice-EE.key", + ("biz-certs/Alice-EE.cer", "biz-certs/Alice-CA.cer")) r_cms = rpki.https.client(certInfo=httpsCerts, msg=q_cms, url="/left-right") r_xml = rpki.cms.decode(r_cms, "biz-certs/Bob-Root.cer") diff --git a/scripts/test-sql.py b/scripts/test-sql.py index 3bf08b19..55484d14 100644 --- a/scripts/test-sql.py +++ b/scripts/test-sql.py @@ -6,7 +6,7 @@ def test(filename, section): print "[Checking " + filename + "]\n" - cfg = ConfigParser.ConfigParser() + cfg = ConfigParser.RawConfigParser() cfg.read(filename) db = MySQLdb.connect(user = cfg.get(section, "username"), |