mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-28 10:04:43 +00:00
The notimplemented decorator reports now the filename and linenumber of the function.
This commit is contained in:
parent
1e13a4f8fc
commit
727281a7fc
1 changed files with 3 additions and 1 deletions
|
|
@ -105,7 +105,9 @@ def notimplemented (func):
|
|||
"""Raises a NotImplementedError if the function is called."""
|
||||
def newfunc (*args, **kwargs):
|
||||
"""Raise NotImplementedError"""
|
||||
raise NotImplementedError("%s not implemented" % func.__name__)
|
||||
co = func.func_code
|
||||
attrs = (co.co_name, co.co_filename, co.co_firstlineno)
|
||||
raise NotImplementedError("function %s at %s:%d is not implemented" % attrs)
|
||||
return update_func_meta(newfunc, func)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue