make sure delimiter is basestring for cvsfile

fixes #12062
This commit is contained in:
Brian Coca 2015-08-26 16:36:39 -04:00
parent 0441a7a217
commit b2bfe3502b

View file

@ -30,7 +30,7 @@ class LookupModule(LookupBase):
try:
f = codecs.open(filename, 'r', encoding='utf-8')
creader = csv.reader(f, delimiter=delimiter)
creader = csv.reader(f, delimiter=str(delimiter))
for row in creader:
if row[0] == key:
@ -70,7 +70,7 @@ class LookupModule(LookupBase):
paramvals['delimiter'] = "\t"
lookupfile = self._loader.path_dwim_relative(basedir, 'files', paramvals['file'])
var = self.read_csv(lookupfile, key, paramvals['delimiter'], paramvals['default'], paramvals['col'])
var = self.read_csv(lookupfile, key, str(paramvals['delimiter']), paramvals['default'], paramvals['col'])
if var is not None:
if type(var) is list:
for v in var: