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:
Marius Gedminas 2015-08-27 09:25:51 +03:00
commit df1b41d3d3
5 changed files with 8 additions and 14 deletions

View file

@ -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():