From: Thierry Parmentelat Date: Tue, 29 Mar 2011 13:31:06 +0000 (+0200) Subject: Merge branch 'master' of ssh://git.onelab.eu/git/sfa X-Git-Tag: sfa-1.0-21-ckp1~74^2~40 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=364be2820af7d3c17da96edea8e6f398ff7070a3;hp=e882c413b706b27c6fba2609950bddfa823ef5ae Merge branch 'master' of ssh://git.onelab.eu/git/sfa --- 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):