diff options
| author | Claude Paroz <claude@2xlibre.net> | 2019-10-04 23:23:43 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2019-10-04 23:40:24 +0200 |
| commit | ca8dbcf9bea46607d22fe205498b4c071c705860 (patch) | |
| tree | dd685c19557a42b7655898b2bcf11603f653dbea /tablib/formats/_xls.py | |
| parent | 44185350306c1cbc9a85b5682b4cb5d69a663494 (diff) | |
| download | tablib-ca8dbcf9bea46607d22fe205498b4c071c705860.tar.gz | |
Refs #108 - Test and improve format autodetection
Autodetection was added for the odf format.
Diffstat (limited to 'tablib/formats/_xls.py')
| -rw-r--r-- | tablib/formats/_xls.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tablib/formats/_xls.py b/tablib/formats/_xls.py index baa7904..88e8636 100644 --- a/tablib/formats/_xls.py +++ b/tablib/formats/_xls.py @@ -25,17 +25,17 @@ def detect(stream): try: xlrd.open_workbook(file_contents=stream) return True - except (TypeError, XLRDError): + except Exception: pass try: xlrd.open_workbook(file_contents=stream.read()) return True - except (AttributeError, XLRDError): + except Exception: pass try: xlrd.open_workbook(filename=stream) return True - except: + except Exception: return False |
