MCPcopy Create free account
hub / github.com/THUDM/GLM / wrapper

Function wrapper

data_utils/file_utils.py:134–141  ·  view source on GitHub ↗
(url, *args, **kwargs)

Source from the content-addressed store, hash-verified

132
133 @wraps(func)
134 def wrapper(url, *args, **kwargs):
135 try:
136 return func(url, *args, **kwargs)
137 except ClientError as exc:
138 if int(exc.response["Error"]["Code"]) == 404:
139 raise EnvironmentError("file {} not found".format(url))
140 else:
141 raise
142
143 return wrapper
144

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected