git://git.onelab.eu
/
unfold.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
929f897
)
SFA Rest bug fix if the result value is 0
author
Loic Baron
<loic.baron@lip6.fr>
Wed, 17 Jun 2015 13:01:09 +0000
(15:01 +0200)
committer
Loic Baron
<loic.baron@lip6.fr>
Wed, 17 Jun 2015 13:01:09 +0000
(15:01 +0200)
rest/sfa_api.py
patch
|
blob
|
history
diff --git
a/rest/sfa_api.py
b/rest/sfa_api.py
index
2cfb639
..
f88fc04
100644
(file)
--- a/
rest/sfa_api.py
+++ b/
rest/sfa_api.py
@@
-226,7
+226,9
@@
def sfa_client(request, method, hrn=None, urn=None, object_type=None, rspec=None
# else GetVersion = v3
else:
result = server.Describe([urn] ,[object_cred], api_options)
- dict_result = xmltodict.parse(result['value']['geni_rspec'])
+ if isinstance(result, dict):
+ if result['value'] != 0:
+ dict_result = xmltodict.parse(result['value']['geni_rspec'])
result['parsed'] = dict_result
if 'rspec' in dict_result and 'node' in dict_result['rspec']: