aboutsummaryrefslogtreecommitdiff
path: root/rpki/publication_control.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-10-26 06:29:00 +0000
committerRob Austein <sra@hactrn.net>2015-10-26 06:29:00 +0000
commitb46deb1417dc3596e9ac9fe2fe8cc0b7f42457e7 (patch)
treeca0dc0276d1adc168bc3337ce0564c4ec4957c1b /rpki/publication_control.py
parent397beaf6d9900dc3b3cb612c89ebf1d57b1d16f6 (diff)
"Any programmer who fails to comply with the standard naming, formatting,
or commenting conventions should be shot. If it so happens that it is inconvenient to shoot him, then he is to be politely requested to recode his program in adherence to the above standard." -- Michael Spier, Digital Equipment Corporation svn path=/branches/tk705/; revision=6152
Diffstat (limited to 'rpki/publication_control.py')
-rw-r--r--rpki/publication_control.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/rpki/publication_control.py b/rpki/publication_control.py
index ddb9d417..b0668eef 100644
--- a/rpki/publication_control.py
+++ b/rpki/publication_control.py
@@ -44,31 +44,31 @@ tag_report_error = rpki.relaxng.publication_control.xmlns + "report_error"
def raise_if_error(pdu):
- """
- Raise an appropriate error if this is a <report_error/> PDU.
+ """
+ Raise an appropriate error if this is a <report_error/> PDU.
- As a convience, this will also accept a <msg/> PDU and raise an
- appropriate error if it contains any <report_error/> PDUs.
- """
+ As a convience, this will also accept a <msg/> PDU and raise an
+ appropriate error if it contains any <report_error/> PDUs.
+ """
- if pdu.tag == tag_report_error:
- code = pdu.get("error_code")
- logger.debug("<report_error/> code %r", code)
- e = getattr(rpki.exceptions, code, None)
- if e is not None and issubclass(e, rpki.exceptions.RPKI_Exception):
- raise e(pdu.text)
- else:
- raise rpki.exceptions.BadPublicationReply("Unexpected response from pubd: %r, %r" % (code, pdu))
+ if pdu.tag == tag_report_error:
+ code = pdu.get("error_code")
+ logger.debug("<report_error/> code %r", code)
+ e = getattr(rpki.exceptions, code, None)
+ if e is not None and issubclass(e, rpki.exceptions.RPKI_Exception):
+ raise e(pdu.text)
+ else:
+ raise rpki.exceptions.BadPublicationReply("Unexpected response from pubd: %r, %r" % (code, pdu))
- if pdu.tag == tag_msg:
- for p in pdu:
- raise_if_error(p)
+ if pdu.tag == tag_msg:
+ for p in pdu:
+ raise_if_error(p)
class cms_msg(rpki.x509.XML_CMS_object):
- """
- CMS-signed publication control PDU.
- """
+ """
+ CMS-signed publication control PDU.
+ """
- encoding = "us-ascii"
- schema = rpki.relaxng.publication_control
+ encoding = "us-ascii"
+ schema = rpki.relaxng.publication_control