From 8f3cef60a7331cc6fc2e5a0d2a3390f1fd08b99e Mon Sep 17 00:00:00 2001 From: Loic Baron Date: Wed, 17 Jun 2015 15:01:09 +0200 Subject: [PATCH] SFA Rest bug fix if the result value is 0 --- rest/sfa_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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']: -- 2.43.0