summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/cloud/google/gcp_url_map.py
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2018-09-07 17:59:46 -0700
committerToshio Kuratomi <a.badger@gmail.com>2018-12-16 15:03:19 -0800
commit3fba0062078cc04eabb460ec1eb13a4739235199 (patch)
tree9c09103ce103a90f97ccf3736ca6c2502d7860f8 /lib/ansible/modules/cloud/google/gcp_url_map.py
parent5147e792d398258a5a87c3271ea89c1c4fd2f4d3 (diff)
downloadansible-3fba0062078cc04eabb460ec1eb13a4739235199.tar.gz
Update bare exceptions to specify Exception.
This will keep us from accidentally catching program-exiting exceptions like KeyboardInterupt and SystemExit.
Diffstat (limited to 'lib/ansible/modules/cloud/google/gcp_url_map.py')
-rw-r--r--lib/ansible/modules/cloud/google/gcp_url_map.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ansible/modules/cloud/google/gcp_url_map.py b/lib/ansible/modules/cloud/google/gcp_url_map.py
index 26d7c80ded..51706ad47b 100644
--- a/lib/ansible/modules/cloud/google/gcp_url_map.py
+++ b/lib/ansible/modules/cloud/google/gcp_url_map.py
@@ -178,7 +178,7 @@ def _validate_params(params):
_validate_path_matcher_params(params['path_matchers'])
if 'host_rules' in params and params['host_rules'] is not None:
_validate_host_rules_params(params['host_rules'])
- except:
+ except Exception:
raise
return (True, '')
@@ -220,7 +220,7 @@ def _validate_path_matcher_params(path_matchers):
if not path.startswith('/'):
raise ValueError("path for %s must start with /" % (
pm['name']))
- except:
+ except Exception:
raise
return (True, '')
@@ -259,7 +259,7 @@ def _validate_host_rules_params(host_rules):
raise ValueError("wildcard be followed by a '.' or '-', %s" % (
host))
- except:
+ except Exception:
raise
return (True, '')
@@ -341,7 +341,7 @@ def get_url_map(client, name, project_id=None):
try:
req = client.urlMaps().get(project=project_id, urlMap=name)
return GCPUtils.execute_api_client_req(req, raise_404=False)
- except:
+ except Exception:
raise
@@ -367,7 +367,7 @@ def create_url_map(client, params, project_id):
name=params['url_map_name'],
project_id=project_id)
return (True, return_data)
- except:
+ except Exception:
raise
@@ -391,7 +391,7 @@ def delete_url_map(client, name, project_id):
req = client.urlMaps().delete(project=project_id, urlMap=name)
return_data = GCPUtils.execute_api_client_req(req, client)
return (True, return_data)
- except:
+ except Exception:
raise
@@ -431,7 +431,7 @@ def update_url_map(client, url_map, params, name, project_id):
urlMap=name, body=gcp_dict)
return_data = GCPUtils.execute_api_client_req(req, client=client, raw=False)
return (True, return_data)
- except:
+ except Exception:
raise