diff -r f4dec0cca9a1 -r 84468b90e9c1 dataimport/csv.py --- a/dataimport/csv.py Wed Sep 16 11:23:51 2015 +0200 +++ b/dataimport/csv.py Mon Sep 14 16:03:07 2015 +0200 @@ -22,11 +22,13 @@ import warnings import os.path as osp +from six import string_types + from logilab.common import shellutils def count_lines(stream_or_filename): - if isinstance(stream_or_filename, basestring): + if isinstance(stream_or_filename, string_types): f = open(stream_or_filename) else: f = stream_or_filename @@ -47,7 +49,7 @@ if quote is not None: quotechar = quote warnings.warn("[3.20] 'quote' kwarg is deprecated, use 'quotechar' instead") - if isinstance(stream_or_path, basestring): + if isinstance(stream_or_path, string_types): if not osp.exists(stream_or_path): raise Exception("file doesn't exists: %s" % stream_or_path) stream = open(stream_or_path)