fix bogus hasttr usage
diff --git a/Lib/copy.py b/Lib/copy.py
index 3bbf3e7..a48e8c8 100644
--- a/Lib/copy.py
+++ b/Lib/copy.py
@@ -115,7 +115,7 @@
state = x.__getstate__()
else:
state = x.__dict__
- if y.hasattr('__setstate__'):
+ if hasattr(y, '__setstate__'):
y.__setstate__(state)
else:
for key in state.keys():
@@ -209,7 +209,7 @@
else:
state = x.__dict__
state = deepcopy(state, memo)
- if y.hasattr('__setstate__'):
+ if hasattr(y, '__setstate__'):
y.__setstate__(state)
else:
for key in state.keys():