Merge "Use the name for this attribute that exists on Python3"

This commit is contained in:
Jenkins 2013-09-03 10:34:09 +00:00 committed by Gerrit Code Review
commit 91e9ea9cf8

View File

@ -72,10 +72,10 @@ def allownoqa(f):
HackingDecoratorError: if physical_line argument missing from HackingDecoratorError: if physical_line argument missing from
decorated function. decorated function.
""" """
if 'physical_line' not in f.func_code.co_varnames: if 'physical_line' not in f.__code__.co_varnames:
raise HackingDecoratorError("Missing physical_line argument " raise HackingDecoratorError("Missing physical_line argument "
"for decorated function") "for decorated function")
index = f.func_code.co_varnames.index('physical_line') index = f.__code__.co_varnames.index('physical_line')
if pep8.noqa(args[index]): if pep8.noqa(args[index]):
return return
else: else: