1
0
mirror of https://github.com/gryf/ebook-converter.git synced 2026-01-18 02:04:12 +01:00

Removing some more unused functions

This commit is contained in:
2020-07-05 17:16:52 +02:00
parent 210dd77e5f
commit 37ac7730e4
2 changed files with 1 additions and 20 deletions

View File

@@ -13,24 +13,5 @@ def as_bytes(x, encoding='utf-8'):
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):
return (a > b) - (a < b)
def reload(module):
return importlib.reload(module)

View File

@@ -380,7 +380,7 @@ class TemplateFormatter(string.Formatter):
traceback.print_exc()
if column_name:
prints('Error evaluating column named:', column_name)
ans = error_value + ' ' + error_message(e)
ans = error_value + ' ' + str(e)
return ans