Skip to content

Commit bb15fcd

Browse files
authored
Not all things have a __dict__, skip update for now if the case (#25)
1 parent 6db573a commit bb15fcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/spatch/backend_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def new_func(*args, **kwargs):
920920
new_func.__kwdefaults__ = self.__kwdefaults__ = getattr(func, "__kwdefaults__", None)
921921
new_func.__annotations__ = self.__annotations__ = getattr(func, "__annotations__", {})
922922
new_func.__type_params__ = self.__type_params__ = getattr(func, "__type_params__", ())
923-
new_func.__dict__.update(func.__dict__)
923+
new_func.__dict__.update(getattr(func, "__dict__", {}))
924924
# self.__dict__.update(func.__dict__) # Don't clobber self.__dict__; too risky!
925925
self.__wrapped__ = func
926926
new_func.__wrapped__ = self

0 commit comments

Comments
 (0)