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:
d78f132
)
handle peers with old version of myplc that does not support 'hrn' field in Node
author
Mohamed Larabi
<mohamed.larabi@inria.fr>
Fri, 29 Nov 2013 17:18:45 +0000
(18:18 +0100)
committer
Mohamed Larabi
<mohamed.larabi@inria.fr>
Fri, 29 Nov 2013 17:18:45 +0000
(18:18 +0100)
PLC/Methods/GetPeerData.py
patch
|
blob
|
history
diff --git
a/PLC/Methods/GetPeerData.py
b/PLC/Methods/GetPeerData.py
index
aff8f88
..
1f0bc50
100644
(file)
--- a/
PLC/Methods/GetPeerData.py
+++ b/
PLC/Methods/GetPeerData.py
@@
-47,8
+47,11
@@
class GetPeerData(Method):
# Filter out various secrets
node_fields = [ field for field in Node.fields if field \
not in ['boot_nonce', 'key', 'session', 'root_person_ids']]
- node_fields += ['hrn']
- nodes = Nodes(self.api, {'peer_id': None}, node_fields);
+ try:
+ node_fields += ['hrn']
+ nodes = Nodes(self.api, {'peer_id': None}, node_fields)
+ except:
+ nodes = Nodes(self.api, {'peer_id': None}, node_fields)
# filter out whitelisted nodes
nodes = [ n for n in nodes if not n['slice_ids_whitelist']]