mirror of
https://github.com/gryf/ebook-converter.git
synced 2026-03-18 15:53:41 +01:00
Removing some more unused functions
This commit is contained in:
@@ -13,24 +13,5 @@ def as_bytes(x, encoding='utf-8'):
|
|||||||
return str(x).encode(encoding)
|
return str(x).encode(encoding)
|
||||||
|
|
||||||
|
|
||||||
def error_message(exc):
|
|
||||||
args = getattr(exc, 'args', None)
|
|
||||||
if args and isinstance(args[0], str):
|
|
||||||
return args[0]
|
|
||||||
return str(exc)
|
|
||||||
|
|
||||||
|
|
||||||
def exec_path(path, ctx=None):
|
|
||||||
ctx = ctx or {}
|
|
||||||
with open(path, 'rb') as f:
|
|
||||||
code = f.read()
|
|
||||||
code = compile(code, f.name, 'exec')
|
|
||||||
exec(code, ctx)
|
|
||||||
|
|
||||||
|
|
||||||
def cmp(a, b):
|
def cmp(a, b):
|
||||||
return (a > b) - (a < b)
|
return (a > b) - (a < b)
|
||||||
|
|
||||||
|
|
||||||
def reload(module):
|
|
||||||
return importlib.reload(module)
|
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ class TemplateFormatter(string.Formatter):
|
|||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
if column_name:
|
if column_name:
|
||||||
prints('Error evaluating column named:', column_name)
|
prints('Error evaluating column named:', column_name)
|
||||||
ans = error_value + ' ' + error_message(e)
|
ans = error_value + ' ' + str(e)
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user