aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rpkid/rpki/async.py2
-rw-r--r--rpkid/rpki/https.py4
-rw-r--r--rpkid/rpki/sundial.py2
-rw-r--r--rpkid/rpki/up_down.py2
-rw-r--r--rpkid/rpki/x509.py9
5 files changed, 9 insertions, 10 deletions
diff --git a/rpkid/rpki/async.py b/rpkid/rpki/async.py
index ba817007..ee82800a 100644
--- a/rpkid/rpki/async.py
+++ b/rpkid/rpki/async.py
@@ -52,7 +52,7 @@ class iterator(object):
except (ExitNow, SystemExit):
raise
except:
- rpki.log.debug("Problem constructing iterator for %s" % repr(iterable))
+ rpki.log.debug("Problem constructing iterator for %r" % (iterable,))
raise
self.doit()
diff --git a/rpkid/rpki/https.py b/rpkid/rpki/https.py
index 305182e1..ccb74488 100644
--- a/rpkid/rpki/https.py
+++ b/rpkid/rpki/https.py
@@ -517,7 +517,7 @@ class http_client(http_stream):
timeout = default_client_timeout
def __init__(self, queue, hostport, cert = None, key = None, ta = ()):
- self.log("Creating new connection to %s" % repr(hostport))
+ self.log("Creating new connection to %r" % (hostport,))
self.log("cert %r key %r ta %r" % (cert, key, ta))
http_stream.__init__(self)
self.queue = queue
@@ -630,7 +630,7 @@ class http_queue(object):
log = logger
def __init__(self, hostport, cert = None, key = None, ta = ()):
- self.log("Creating queue for %s" % repr(hostport))
+ self.log("Creating queue for %r" % (hostport,))
self.log("cert %r key %r ta %r" % (cert, key, ta))
self.hostport = hostport
self.client = None
diff --git a/rpkid/rpki/sundial.py b/rpkid/rpki/sundial.py
index cb34778e..2293c1dc 100644
--- a/rpkid/rpki/sundial.py
+++ b/rpkid/rpki/sundial.py
@@ -210,7 +210,7 @@ class timedelta(pydatetime.timedelta):
if match:
return cls(**dict((k, int(v)) for (k, v) in match.groupdict().items() if v is not None))
else:
- raise RuntimeError, "Couldn't parse timedelta %s" % repr(arg)
+ raise RuntimeError, "Couldn't parse timedelta %r" % (arg,)
def convert_to_seconds(self):
diff --git a/rpkid/rpki/up_down.py b/rpkid/rpki/up_down.py
index e5352e1a..22168d11 100644
--- a/rpkid/rpki/up_down.py
+++ b/rpkid/rpki/up_down.py
@@ -363,7 +363,7 @@ class issue_pdu(base_elt):
ca = child.ca_from_class_name(self.class_name)
ca_detail = ca.fetch_active()
if ca_detail is None:
- raise rpki.exceptions.NoActiveCA, "No active CA for class %s" % repr(self.class_name)
+ raise rpki.exceptions.NoActiveCA, "No active CA for class %r" % self.class_name
# Check current cert, if any
diff --git a/rpkid/rpki/x509.py b/rpkid/rpki/x509.py
index 540209d0..6d63bc7e 100644
--- a/rpkid/rpki/x509.py
+++ b/rpkid/rpki/x509.py
@@ -175,7 +175,7 @@ class DER_object(object):
self.clear()
self.DER = value
return
- raise rpki.exceptions.DERObjectConversionError, "Can't honor conversion request %s" % repr(kw)
+ raise rpki.exceptions.DERObjectConversionError, "Can't honor conversion request %r" % (kw,)
def get_DER(self):
"""
@@ -573,7 +573,7 @@ class PKCS10(DER_object):
for method, location in req_exts.get("subjectInfoAccess", ()):
if rpki.oids.oid2name.get(method) == "id-ad-caRepository" and \
(location[0] != "uri" or (location[1].startswith("rsync://") and not location[1].endswith("/"))):
- raise rpki.exceptions.BadPKCS10, "Certificate request includes bad SIA component: %s" % repr(location)
+ raise rpki.exceptions.BadPKCS10, "Certificate request includes bad SIA component: %r" % location
# This one is an implementation restriction. I don't yet
# understand what the spec is telling me to do in this case.
@@ -786,8 +786,7 @@ class CMS_object(DER_object):
raise
except:
if self.print_on_der_error:
- rpki.log.debug("Problem parsing DER CMS message, might not really be DER: %s"
- % repr(self.get_DER()))
+ rpki.log.debug("Problem parsing DER CMS message, might not really be DER: %r" % self.get_DER())
raise rpki.exceptions.UnparsableCMSDER
if cms.eContentType() != self.econtent_oid:
@@ -800,7 +799,7 @@ class CMS_object(DER_object):
for x in certs:
rpki.log.debug("Received CMS cert issuer %s subject %s SKI %s" % (x.getIssuer(), x.getSubject(), x.hSKI()))
for c in crls:
- rpki.log.debug("Received CMS CRL issuer %s" % repr(c.getIssuer()))
+ rpki.log.debug("Received CMS CRL issuer %r" % (c.getIssuer(),))
store = POW.X509Store()