mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Avoid types.NoneType
types.NoneType was removed in Python 3. None is a singleton in Python, so 'x is None' is equivalent to 'isinstance(x, NoneType)'.
This commit is contained in:
@@ -245,7 +245,7 @@ def _list_into_cache(regions):
|
||||
if cs is None:
|
||||
warnings.warn(
|
||||
'Connecting to Rackspace region "%s" has caused Pyrax to '
|
||||
'return a NoneType. Is this a valid region?' % region,
|
||||
'return None. Is this a valid region?' % region,
|
||||
RuntimeWarning)
|
||||
continue
|
||||
for server in cs.servers.list():
|
||||
|
||||
Reference in New Issue
Block a user