Skip to content
Snippets Groups Projects
Commit 7675bff4 authored by Tanner Prestegard's avatar Tanner Prestegard Committed by GraceDB
Browse files

Python 3: remove use of basestring

parent 2ca28a5f
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ def convertToAbsTime(toks):
else:
day = pytz.utc.localize(datetime(now.year, now.month, now.day))
if "timeOfDay" in toks:
if isinstance(toks.timeOfDay,basestring):
if isinstance(toks.timeOfDay, str):
timeOfDay = {
"now" : timedelta(0, (now.hour*60+now.minute)*60+now.second, now.microsecond),
"noon" : timedelta(0,0,0,0,0,12),
......
......@@ -47,7 +47,7 @@ def cleanData(val, field_name, table_name='events_event'):
return maxval
else:
return val
elif isinstance(val, basestring):
elif isinstance(val, str):
raise ValueError("Unrecognized string in the %s column" % field_name)
else:
raise ValueError("Unrecognized value in column %s" % field_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment