summaryrefslogtreecommitdiff
path: root/tablib/formats/_tsv.py
diff options
context:
space:
mode:
authorVanL <van.lindberg@gmail.com>2012-01-06 00:12:06 +0000
committerVanL <van.lindberg@gmail.com>2012-01-06 00:12:06 +0000
commit9c65515e7a7d466be2168c65ea5a88a40cd3f248 (patch)
treeae5c964f7518fb806ec1fbf2cf7456d30b43fa59 /tablib/formats/_tsv.py
parentc87a954a9ec539814aee65ec40d86e33147e227e (diff)
downloadtablib-9c65515e7a7d466be2168c65ea5a88a40cd3f248.tar.gz
Add detect function in _xls. Update yaml, csv, and tsv detection functions to catch other errors when faced with invalid input.
Diffstat (limited to 'tablib/formats/_tsv.py')
-rw-r--r--tablib/formats/_tsv.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tablib/formats/_tsv.py b/tablib/formats/_tsv.py
index f581f81..ac9554c 100644
--- a/tablib/formats/_tsv.py
+++ b/tablib/formats/_tsv.py
@@ -55,5 +55,5 @@ def detect(stream):
try:
csv.Sniffer().sniff(stream, delimiters='\t')
return True
- except csv.Error:
+ except (csv.Error, TypeError):
return False