mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 17:04:39 +02:00
py3: dont use func_name
This commit is contained in:
parent
5e10e3663b
commit
b78e24417a
1 changed files with 1 additions and 1 deletions
|
|
@ -385,7 +385,7 @@ def run(self, opts):
|
|||
src = ''.join(inspect.getsourcelines(func)[0][1:])
|
||||
except Exception:
|
||||
continue
|
||||
src = src.replace('def ' + func.func_name, 'def replace')
|
||||
src = src.replace('def ' + func.__name__, 'def replace')
|
||||
imports = ['from %s import %s' % (x.__module__, x.__name__) for x in func.imports]
|
||||
if imports:
|
||||
src = '\n'.join(imports) + '\n\n' + src
|
||||
|
|
|
|||
Loading…
Reference in a new issue