Closed toconnell closed 9 months ago
Looks like this got missed in the grand scheme to deprecate name lookups for assets.
Fixed in the next release:
# if the asset is still None, we want to raise an expception
if asset is None and raise_exception_if_not_found:
- if not backoff_to_name:
- curframe = inspect.currentframe()
- calframe = inspect.getouterframes(curframe, 2)
- caller_function = calframe[1][3]
- msg = (
- "%s() -> get_asset() "
- "The handle '%s' could not be found in %s!"
- ) % (caller_function, handle, self.get_handles() )
- self.logger.error(msg)
- elif backoff_to_name:
- msg = "After backoff to name lookup, asset handle '%s' is not\
- in %s and could not be retrieved." % (handle, self.get_names())
- self.logger.error(msg)
+ curframe = inspect.currentframe()
+ calframe = inspect.getouterframes(curframe, 2)
+ caller_function = calframe[1][3]
+ msg = (
+ "%s() -> get_asset() "
+ "The handle '%s' could not be found in %s!"
+ ) % (caller_function, handle, self.get_handles() )
+ self.logger.error(msg)
raise utils.InvalidUsage(msg, status_code=500)