git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d337b03
)
- fix if node has no node networks
author
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 25 Sep 2006 18:13:07 +0000
(18:13 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 25 Sep 2006 18:13:07 +0000
(18:13 +0000)
PLC/Methods/AdmGetAllNodeNetworks.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/AdmGetAllNodeNetworks.py
b/PLC/Methods/AdmGetAllNodeNetworks.py
index
18e8131
..
3e9eb1c
100644
(file)
--- a/
PLC/Methods/AdmGetAllNodeNetworks.py
+++ b/
PLC/Methods/AdmGetAllNodeNetworks.py
@@
-32,9
+32,10
@@
class AdmGetAllNodeNetworks(Method):
node = nodes[0]
# Get node networks for this node
- nodenetworks = NodeNetworks(self.api, node['nodenetwork_ids']).values()
- if not nodenetworks:
- raise PLCInvalidArgument, "Node has no node networks"
+ if node['nodenetwork_ids']:
+ nodenetworks = NodeNetworks(self.api, node['nodenetwork_ids']).values()
+ else:
+ nodenetworks = []
# Filter out undesired or None fields (XML-RPC cannot marshal
# None) and turn each node into a real dict.