summaryrefslogtreecommitdiff
path: root/tablib/formats/_dbf.py
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2019-10-04 23:23:43 +0200
committerClaude Paroz <claude@2xlibre.net>2019-10-04 23:40:24 +0200
commitca8dbcf9bea46607d22fe205498b4c071c705860 (patch)
treedd685c19557a42b7655898b2bcf11603f653dbea /tablib/formats/_dbf.py
parent44185350306c1cbc9a85b5682b4cb5d69a663494 (diff)
downloadtablib-ca8dbcf9bea46607d22fe205498b4c071c705860.tar.gz
Refs #108 - Test and improve format autodetection
Autodetection was added for the odf format.
Diffstat (limited to 'tablib/formats/_dbf.py')
-rw-r--r--tablib/formats/_dbf.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/tablib/formats/_dbf.py b/tablib/formats/_dbf.py
index 710797d..0d1c87b 100644
--- a/tablib/formats/_dbf.py
+++ b/tablib/formats/_dbf.py
@@ -83,9 +83,5 @@ def detect(stream):
else:
_dbf = dbf.Dbf(StringIO(stream), readOnly=True)
return True
- except (ValueError, struct.error):
- # When we try to open up a file that's not a DBF, dbfpy raises a
- # ValueError.
- # When unpacking a string argument with less than 8 chars, struct.error is
- # raised.
+ except Exception:
return False