mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix deprecation warnings in the Google modules.
This commit is contained in:
@@ -112,7 +112,7 @@ except ImportError:
|
||||
ARGS = getattr(secrets, 'GCE_PARAMS', ())
|
||||
KWARGS = getattr(secrets, 'GCE_KEYWORD_PARAMS', {})
|
||||
|
||||
if not ARGS or not KWARGS.has_key('project'):
|
||||
if not ARGS or not 'project' in KWARGS:
|
||||
print("failed=True " + \
|
||||
"msg='Missing GCE connection parameters in libcloud secrets file.'")
|
||||
sys.exit(1)
|
||||
@@ -195,7 +195,8 @@ def main():
|
||||
module.fail_json(msg="Must supply a size_gb", changed=False)
|
||||
try:
|
||||
size_gb = int(round(float(size_gb)))
|
||||
if size_gb < 1: raise Exception
|
||||
if size_gb < 1:
|
||||
raise Exception
|
||||
except:
|
||||
module.fail_json(msg="Must supply a size_gb larger than 1 GB",
|
||||
changed=False)
|
||||
|
||||
Reference in New Issue
Block a user