mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-04-23 00:01:10 +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))
|
||||
# add additional class specific caching (if available)
|
||||
cache = getattr(cls, 'cache', None)
|
||||
if isinstance(cache, collections.Callable):
|
||||
if isinstance(cache, collections.abc.Callable):
|
||||
cache(cached)
|
||||
return cached
|
||||
else:
|
||||
@ -171,7 +171,7 @@ class BaseWrapper(object, metaclass=MetaWrapper):
|
||||
else:
|
||||
# not a LP API representation, let the specific class handle it
|
||||
fetch = getattr(cls, 'fetch', None)
|
||||
if isinstance(fetch, collections.Callable):
|
||||
if isinstance(fetch, collections.abc.Callable):
|
||||
return fetch(data)
|
||||
else:
|
||||
raise NotImplementedError("Don't know how to fetch '%s' from LP"
|
||||
|
Loading…
x
Reference in New Issue
Block a user