Commit f121b627 authored by Michael Foord's avatar Michael Foord

unittest.mock: removed another bit of Python 2 only code

parent 45624cdb
...@@ -1086,12 +1086,6 @@ class _patch(object): ...@@ -1086,12 +1086,6 @@ class _patch(object):
patching.__exit__(*exc_info) patching.__exit__(*exc_info)
patched.patchings = [self] patched.patchings = [self]
if hasattr(func, 'func_code'):
# not in Python 3
patched.compat_co_firstlineno = getattr(
func, "compat_co_firstlineno",
func.func_code.co_firstlineno
)
return patched return patched
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment