mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
py3: dont use func_name
This commit is contained in:
parent
5e10e3663b
commit
b78e24417a
@ -385,7 +385,7 @@ class Resources(Command): # {{{
|
|||||||
src = ''.join(inspect.getsourcelines(func)[0][1:])
|
src = ''.join(inspect.getsourcelines(func)[0][1:])
|
||||||
except Exception:
|
except Exception:
|
||||||
continue
|
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]
|
imports = ['from %s import %s' % (x.__module__, x.__name__) for x in func.imports]
|
||||||
if imports:
|
if imports:
|
||||||
src = '\n'.join(imports) + '\n\n' + src
|
src = '\n'.join(imports) + '\n\n' + src
|
||||||
|
Loading…
x
Reference in New Issue
Block a user