diff options
| author | VanL <van.lindberg@gmail.com> | 2012-01-06 00:12:06 +0000 |
|---|---|---|
| committer | VanL <van.lindberg@gmail.com> | 2012-01-06 00:12:06 +0000 |
| commit | 9c65515e7a7d466be2168c65ea5a88a40cd3f248 (patch) | |
| tree | ae5c964f7518fb806ec1fbf2cf7456d30b43fa59 /tablib/formats/_tsv.py | |
| parent | c87a954a9ec539814aee65ec40d86e33147e227e (diff) | |
| download | tablib-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.py | 2 |
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 |
