mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-08 23:41:28 +00:00
ubuntutools/lp: Python 3.10 compatibility
This commit is contained in:
parent
3a903ca628
commit
0dde3262d1
@ -162,7 +162,7 @@ class BaseWrapper(object, metaclass=MetaWrapper):
|
|||||||
Logger.debug("%s: %s" % (cls.__name__, data.self_link))
|
Logger.debug("%s: %s" % (cls.__name__, data.self_link))
|
||||||
# add additional class specific caching (if available)
|
# add additional class specific caching (if available)
|
||||||
cache = getattr(cls, 'cache', None)
|
cache = getattr(cls, 'cache', None)
|
||||||
if isinstance(cache, collections.Callable):
|
if isinstance(cache, collections.abc.Callable):
|
||||||
cache(cached)
|
cache(cached)
|
||||||
return cached
|
return cached
|
||||||
else:
|
else:
|
||||||
@ -171,7 +171,7 @@ class BaseWrapper(object, metaclass=MetaWrapper):
|
|||||||
else:
|
else:
|
||||||
# not a LP API representation, let the specific class handle it
|
# not a LP API representation, let the specific class handle it
|
||||||
fetch = getattr(cls, 'fetch', None)
|
fetch = getattr(cls, 'fetch', None)
|
||||||
if isinstance(fetch, collections.Callable):
|
if isinstance(fetch, collections.abc.Callable):
|
||||||
return fetch(data)
|
return fetch(data)
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError("Don't know how to fetch '%s' from LP"
|
raise NotImplementedError("Don't know how to fetch '%s' from LP"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user