Fix initializing err in _get_err_from_resp_json

This commit is contained in:
Hiroaki Nakamura 2016-07-05 21:34:27 +09:00
parent 0140e50d55
commit dcee274ebb

View file

@ -124,6 +124,7 @@ class LXDClient(object):
@staticmethod @staticmethod
def _get_err_from_resp_json(resp_json): def _get_err_from_resp_json(resp_json):
err = None
metadata = resp_json.get('metadata', None) metadata = resp_json.get('metadata', None)
if metadata is not None: if metadata is not None:
err = metadata.get('err', None) err = metadata.get('err', None)