From 22e9e351b59dcb3312d95b880d4e623bb51d9b0a Mon Sep 17 00:00:00 2001 From: Yaroslav Klyuyev Date: Fri, 11 Apr 2014 13:04:54 +0300 Subject: [PATCH 1/2] fix for https://github.com/twilio/twilio-python/issues/161 --- twilio/rest/resources/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twilio/rest/resources/base.py b/twilio/rest/resources/base.py index 07e00175a3..3efcd3ecf3 100644 --- a/twilio/rest/resources/base.py +++ b/twilio/rest/resources/base.py @@ -223,7 +223,7 @@ def load(self, entries): del entries["uri"] for key in entries.keys(): - if key.startswith("date_") and isinstance(entries[key], str): + if key.startswith("date_") and isinstance(entries[key], six.string_types): entries[key] = parse_rfc2822_date(entries[key]) self.__dict__.update(entries) From 5a521862e34db5fcefff1ae54459829eec932afe Mon Sep 17 00:00:00 2001 From: Yaroslav Klyuyev Date: Fri, 11 Apr 2014 13:14:03 +0300 Subject: [PATCH 2/2] using proper variable for instance checking (twilio#161) --- twilio/rest/resources/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twilio/rest/resources/base.py b/twilio/rest/resources/base.py index 3efcd3ecf3..89d14f7bb5 100644 --- a/twilio/rest/resources/base.py +++ b/twilio/rest/resources/base.py @@ -223,7 +223,7 @@ def load(self, entries): del entries["uri"] for key in entries.keys(): - if key.startswith("date_") and isinstance(entries[key], six.string_types): + if key.startswith("date_") and isinstance(entries[key], string_types): entries[key] = parse_rfc2822_date(entries[key]) self.__dict__.update(entries)