From 7082fa14ff0a64741f9286d7204470bd8d9e2fe1 Mon Sep 17 00:00:00 2001 From: Luca Falavigna Date: Sun, 29 Nov 2009 17:58:36 +0100 Subject: [PATCH] ubuntutools/lp/lpapicache.py: recent lazr.restfulclient does use of unicode strings, use basestring to catch bot str and unicode. --- debian/changelog | 6 +++++- ubuntutools/lp/lpapicache.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 07ad0df..49de572 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 Sun, 29 Nov 2009 17:52:33 +0100 ubuntu-dev-tools (0.83) lucid; urgency=low diff --git a/ubuntutools/lp/lpapicache.py b/ubuntutools/lp/lpapicache.py index b0150fd..6ea7878 100644 --- a/ubuntutools/lp/lpapicache.py +++ b/ubuntutools/lp/lpapicache.py @@ -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)