X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osmclient%2Fsol005%2Fsubscription.py;h=e58ef639b77d7a6eeb356992e1c299776d2e96c1;hb=c0420cf86aaed737f59666516dd9e4de5c5db16c;hp=d4860acdd1fdd00f3fbe08ca1c688cf374f0ab8c;hpb=54a2a65cf3c784ceeb41e2351140ce216a21dd4d;p=osm%2Fosmclient.git diff --git a/osmclient/sol005/subscription.py b/osmclient/sol005/subscription.py index d4860ac..e58ef63 100644 --- a/osmclient/sol005/subscription.py +++ b/osmclient/sol005/subscription.py @@ -127,12 +127,10 @@ class Subscription(object): "{}/{}".format(self._apiBase, subscription_id) ) self._logger.debug(yaml.safe_dump(resp)) - if resp: - return json.loads(resp) if not resp or "id" not in resp: raise ClientException( "failed to get subscription info: {}".format(resp) ) - return resp + return json.loads(resp) except NotFound: raise NotFound("subscription '{}' not found".format(subscription_id))