Fix deprecated function use

This commit is contained in:
Siu Kwan Lam 2014-02-18 14:13:40 -06:00
commit b86cc097d9
3 changed files with 7 additions and 2 deletions

View file

@ -15,7 +15,7 @@ def deprecated(func):
@functools.wraps(func)
def new_func(*args, **kwargs):
warnings.warn_explicit(
"Call to deprecated function {}.".format(func.__name__),
"Call to deprecated function %s." % (func.__name__,),
category=DeprecationWarning,
filename=func.func_code.co_filename,
lineno=func.func_code.co_firstlineno + 1