From: Loic Baron Date: Wed, 17 Jun 2015 13:01:09 +0000 (+0200) Subject: SFA Rest bug fix if the result value is 0 X-Git-Tag: myslice-1.5~4 X-Git-Url: http://git.onelab.eu/?p=unfold.git;a=commitdiff_plain;h=8f3cef60a7331cc6fc2e5a0d2a3390f1fd08b99e SFA Rest bug fix if the result value is 0 --- diff --git a/rest/sfa_api.py b/rest/sfa_api.py index 2cfb639a..f88fc049 100644 --- 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']: