ubuntutools/lp/lpapicache.py: recent lazr.restfulclient does use of

unicode strings, use basestring to catch bot str and unicode.
This commit is contained in:
Luca Falavigna 2009-11-29 17:58:36 +01:00
parent 0f734c5ef8
commit 7082fa14ff
2 changed files with 6 additions and 2 deletions

6
debian/changelog vendored
View File

@ -7,7 +7,11 @@ ubuntu-dev-tools (0.84) UNRELEASED; urgency=low
[ Manny Vindiola ]
* grab-merge: Only download files listed multiple times in REPORT once
-- Manny Vindiola <mannyv@gmail.com> Tue, 24 Nov 2009 17:03:08 -0500
[ Luca Falavigna ]
* ubuntutools/lp/lpapicache.py: recent lazr.restfulclient does use of
unicode strings, use basestring to catch bot str and unicode.
-- Luca Falavigna <dktrkranz@debian.org> Sun, 29 Nov 2009 17:52:33 +0100
ubuntu-dev-tools (0.83) lucid; urgency=low

View File

@ -75,7 +75,7 @@ class BaseWrapper(object):
resource_type = None # it's a base class after all
def __new__(cls, data):
if isinstance(data, str) and data.startswith('https://api.edge.launchpad.net/beta/'):
if isinstance(data, basestring) and data.startswith('https://api.edge.launchpad.net/beta/'):
# looks like a LP API URL
# check if it's already cached
cached = cls._cache.get(data)