diff --git a/messytables/excel.py b/messytables/excel.py index 9d30131..2d9f698 100644 --- a/messytables/excel.py +++ b/messytables/excel.py @@ -45,12 +45,8 @@ def get_workbook(): file_contents=read_obj, encoding_override=encoding, formatting_info=with_formatting_info) - except XLRDError as e: - _, value, traceback = sys.exc_info() - if PY2: - raise ReadError("Can't read Excel file: %r" % value, traceback) - else: - raise ReadError("Can't read Excel file: %r" % value).with_traceback(traceback) + except XLRDError as xlrdexc: + raise ReadError("Can't read Excel file: %r" % xlrdexc) '''Initilize the tableset. :param encoding: passed on to xlrd.open_workbook function