diff options
author | Rob Austein <sra@hactrn.net> | 2012-10-12 22:51:07 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2012-10-12 22:51:07 +0000 |
commit | 72d61753b3ab0096aa66bfce357fbf8c15d4f999 (patch) | |
tree | cdca633cfd1722aa671281d7ee09d3977f0fea27 /rpkid | |
parent | f91067126a35c2df1d5fff8d0061262e568114c1 (diff) |
Deobfuscate.
svn path=/branches/tk274/; revision=4774
Diffstat (limited to 'rpkid')
-rw-r--r-- | rpkid/rpki/resource_set.py | 4 | ||||
-rw-r--r-- | rpkid/rpki/rpkid.py | 2 | ||||
-rw-r--r-- | rpkid/rpki/rpkid_tasks.py | 2 | ||||
-rw-r--r-- | rpkid/rpki/up_down.py | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/rpkid/rpki/resource_set.py b/rpkid/rpki/resource_set.py index cd6a405e..38217223 100644 --- a/rpkid/rpki/resource_set.py +++ b/rpkid/rpki/resource_set.py @@ -436,7 +436,7 @@ class resource_set(list): Set symmetric difference (XOR) for resource sets. """ com = self._comm(other) - return com[0].union(com[1]) + return com[0] | com[1] __xor__ = symmetric_difference @@ -913,7 +913,7 @@ class roa_prefix_set(list): s.append(None) for p in self: s[0] = p.to_resource_range() - r = r.union(s) + r |= s return r @classmethod diff --git a/rpkid/rpki/rpkid.py b/rpkid/rpki/rpkid.py index f82d91df..d0cd66cd 100644 --- a/rpkid/rpki/rpkid.py +++ b/rpkid/rpki/rpkid.py @@ -983,7 +983,7 @@ class ca_detail_obj(rpki.sql.sql_persistent): if sia_uri_changed or child_resources.oversized(new_resources): child_cert.reissue( ca_detail = self, - resources = child_resources.intersection(new_resources), + resources = child_resources & new_resources, publisher = publisher) publisher.call_pubd(callback, errback) diff --git a/rpkid/rpki/rpkid_tasks.py b/rpkid/rpki/rpkid_tasks.py index 7fbefc62..d343012e 100644 --- a/rpkid/rpki/rpkid_tasks.py +++ b/rpkid/rpki/rpkid_tasks.py @@ -256,7 +256,7 @@ class UpdateChildrenTask(AbstractTask): ca = ca_detail.ca if ca_detail.state == "active": old_resources = child_cert.cert.get_3779resources() - new_resources = irdb_resources.intersection(old_resources).intersection(ca_detail.latest_ca_cert.get_3779resources()) + new_resources = old_resources & irdb_resources & ca_detail.latest_ca_cert.get_3779resources() if new_resources.empty(): rpki.log.debug("Resources shrank to the null set, revoking and withdrawing child %s certificate SKI %s" % (child.child_handle, child_cert.cert.gSKI())) diff --git a/rpkid/rpki/up_down.py b/rpkid/rpki/up_down.py index 836bdedb..521b3352 100644 --- a/rpkid/rpki/up_down.py +++ b/rpkid/rpki/up_down.py @@ -260,7 +260,7 @@ class list_pdu(base_elt): if not ca_detail: rpki.log.debug("No active ca_detail, can't issue to %s" % child.child_handle) continue - resources = ca_detail.latest_ca_cert.get_3779resources().intersection(irdb_resources) + resources = ca_detail.latest_ca_cert.get_3779resources() & irdb_resources if resources.empty(): rpki.log.debug("No overlap between received resources and what child %s should get ([%s], [%s])" % (child.child_handle, ca_detail.latest_ca_cert.get_3779resources(), irdb_resources)) continue @@ -384,7 +384,7 @@ class issue_pdu(base_elt): if irdb_resources.valid_until < rpki.sundial.now(): raise rpki.exceptions.IRDBExpired, "IRDB entry for child %s expired %s" % (child.child_handle, irdb_resources.valid_until) - resources = irdb_resources.intersection(ca_detail.latest_ca_cert.get_3779resources()) + resources = irdb_resources & ca_detail.latest_ca_cert.get_3779resources() req_key = self.pkcs10.getPublicKey() req_sia = self.pkcs10.get_SIA() child_cert = child.fetch_child_certs(ca_detail = ca_detail, ski = req_key.get_SKI(), unique = True) |