diff --git a/ebook_converter/polyglot/builtins.py b/ebook_converter/polyglot/builtins.py index 912bcb5..66d3204 100644 --- a/ebook_converter/polyglot/builtins.py +++ b/ebook_converter/polyglot/builtins.py @@ -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) diff --git a/ebook_converter/utils/formatter.py b/ebook_converter/utils/formatter.py index 1307399..0b1cec1 100644 --- a/ebook_converter/utils/formatter.py +++ b/ebook_converter/utils/formatter.py @@ -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