X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fplc%2Fnetwork.py;h=c84ffa50e0d61ee8e9178d2681b7ac0f894c2771;hb=9e98da85bd26f9f4b1b337c7b81ad7c7b38d0241;hp=5834f4f6339e51d2fffdd1738a3bcf608eff5e0c;hpb=cccd9d9a58421493631320ee2251e8de3d3f2109;p=sfa.git diff --git a/sfa/plc/network.py b/sfa/plc/network.py index 5834f4f6..c84ffa50 100644 --- a/sfa/plc/network.py +++ b/sfa/plc/network.py @@ -349,6 +349,7 @@ class Network: try: val = self.sites[id] except: + self.api.logger.error("Invalid RSpec: site ID %s not found" % id ) raise InvalidRSpec("site ID %s not found" % id) return val @@ -568,8 +569,12 @@ class Network: """ tmp = [] for node in api.plshell.GetNodes(api.plauth, {'peer_id': None}): - t = node['node_id'], Node(self, node) - tmp.append(t) + try: + t = node['node_id'], Node(self, node) + tmp.append(t) + except: + self.api.logger.error("Failed to add node %s (%s) to RSpec" % (node['hostname'], node['node_id'])) + return dict(tmp) def get_ifaces(self, api):