summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Mazuel <lmazuel@microsoft.com>2017-06-29 01:07:03 (GMT)
committerGitHub <noreply@github.com>2017-06-29 01:07:03 (GMT)
commit5ac960d6f4503dfbeb6493b5dfb0c64fc486a70c (patch)
treef19c23d51de37f47b5461a0bc4a193c404645e68
parent3b359c5ac01308eb086fc7072a5ec4a942d46823 (diff)
downloadisodate-5ac960d6f4503dfbeb6493b5dfb0c64fc486a70c.tar.gz
isinstance(obj, (str, unicode)) to be Py2/3 compat
-rw-r--r--src/isodate/isoduration.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/isodate/isoduration.py b/src/isodate/isoduration.py
index 6da69f5..c3cfc65 100644
--- a/src/isodate/isoduration.py
+++ b/src/isodate/isoduration.py
@@ -80,7 +80,7 @@ def parse_duration(datestring):
The alternative format does not support durations with years, months or
days set to 0.
"""
- if not isinstance(datestring, basestring):
+ if not isinstance(datestring, (str, unicode)):
raise TypeError("Expecting a string %r" % datestring)
match = ISO8601_PERIOD_REGEX.match(datestring)
if not match: