mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-10 18:34:03 -07: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:
parent
da1e611b26
commit
df1b41d3d3
5 changed files with 8 additions and 14 deletions
|
@ -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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue