diff options
author | Rob Austein <sra@hactrn.net> | 2014-08-05 02:05:22 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2014-08-05 02:05:22 +0000 |
commit | b4a2a8ca00b9bfe79636efd8a02a24105b9f929f (patch) | |
tree | 1cff20969f5219855d7fbc113e7a2fd31a58d73c /rpki/pubd.py | |
parent | 1d32064a1cfa3a32e99533f80030fd84b1c66b3b (diff) |
Debug publication protocol <list/> command. Check pubd for existing
objects when rootd doesn't think it knows what's already published.
svn path=/branches/tk705/; revision=5912
Diffstat (limited to 'rpki/pubd.py')
-rw-r--r-- | rpki/pubd.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/rpki/pubd.py b/rpki/pubd.py index 21fd9298..22335ce8 100644 --- a/rpki/pubd.py +++ b/rpki/pubd.py @@ -183,10 +183,11 @@ class main(object): r_msg = q_msg.__class__.reply() delta = self.session.new_delta() failed = False + did_something = False for q_pdu in q_msg: try: if isinstance(q_pdu, rpki.publication.list_elt): - for obj in client.published_objects: + for obj in client.objects: r_pdu = q_pdu.__class__() r_pdu.tag = q_pdu.tag r_pdu.uri = obj.uri @@ -201,6 +202,7 @@ class main(object): r_pdu.tag = q_pdu.tag r_pdu.uri = q_pdu.uri r_msg.append(r_pdu) + did_something = True except (rpki.async.ExitNow, SystemExit): raise except Exception, e: @@ -211,7 +213,7 @@ class main(object): # # This isn't really right as long as we're using SQL autocommit # - if failed: + if failed or not did_something: # This should SQL rollback # # Under current scheme I don't think delta is in SQL yet so this may be wrong |