- _, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, nst['_id']))
- #print(yaml.safe_dump(resp))
- if resp:
- return json.loads(resp)
- raise NotFound("nst {} not found".format(name))
+ try:
+ _, resp = self._http.get2_cmd('{}/{}'.format(self._apiBase, nst['_id']))
+ #print(yaml.safe_dump(resp))
+ if resp:
+ return json.loads(resp)
+ except NotFound:
+ raise NotFound("nst '{}' not found".format(name))
+ raise NotFound("nst '{}' not found".format(name))