From 16c6262cfe1bd9763f31bdf1d399bda5465d6b37 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 24 Sep 2010 18:29:19 +0200 Subject: [PATCH] rebind stuff in reverse order (wrt unbind), and even more paranoid, to be sure that rebind really does the job --- sfa/plc/slices.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sfa/plc/slices.py b/sfa/plc/slices.py index 8728a251..9b3ff5df 100644 --- a/sfa/plc/slices.py +++ b/sfa/plc/slices.py @@ -333,10 +333,12 @@ class Slices: self.api.plshell.AddPersonToSlice(self.api.plauth, person_dict['email'], slicename) self.api.plshell.AddPersonToSite(self.api.plauth, person_dict['email'], site_id) finally: - if peer and not local_person: - self.api.plshell.BindObjectToPeer(self.api.plauth, 'person', person_id, peer, person_dict['pointer']) if peer: - self.api.plshell.BindObjectToPeer(self.api.plauth, 'site', site_id, peer, remote_site_id) + try: self.api.plshell.BindObjectToPeer(self.api.plauth, 'site', site_id, peer, remote_site_id) + except: pass + if peer and not local_person: + try: self.api.plshell.BindObjectToPeer(self.api.plauth, 'person', person_id, peer, person_dict['pointer']) + except: pass self.verify_keys(registry, credential, person_dict, key_ids, person_id, peer, local_person) -- 2.43.0