Skip to content
Browse files

Merge pull request #170 from msabramo/fix-pypy-larget-test-failure

Fix for the fact that some versions of the csv module (apparently
  • Loading branch information...
2 parents 5e3b271 + 1ad45af commit 642a2c72a5f4b56a8523acd2ace70d0b87527008 @onyxfish onyxfish committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 csvkit/unicsv.py
View
3 csvkit/unicsv.py
@@ -6,6 +6,7 @@
import codecs
import csv
+import fnmatch
from cStringIO import StringIO
from csvkit.exceptions import FieldSizeLimitError
@@ -40,7 +41,7 @@ def next(self):
row = self.reader.next()
except csv.Error, e:
# Terrible way to test for this exception, but there is no subclass
- if 'field larger than field limit' in str(e):
+ if fnmatch.fnmatch(str(e), 'field large[rt] than field limit *'):
raise FieldSizeLimitError(csv.field_size_limit())
else:
raise e

0 comments on commit 642a2c7

Please sign in to comment.
Something went wrong with that request. Please try again.