Merge lp:~blr/charms/precise/squid-forwardproxy/trunk into lp:~canonical-launchpad-branches/charms/precise/squid-forwardproxy/trunk

Proposed by Kit Randel
Status: Merged
Merged at revision: 30
Proposed branch: lp:~blr/charms/precise/squid-forwardproxy/trunk
Merge into: lp:~canonical-launchpad-branches/charms/precise/squid-forwardproxy/trunk
Diff against target: 26 lines (+3/-3)
1 file modified
hooks/hooks.py (+3/-3)
To merge this branch: bzr merge lp:~blr/charms/precise/squid-forwardproxy/trunk
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+269699@code.launchpad.net

Commit message

Use yaml.safe_load rather than yaml.load.

Description of the change

Use yaml.safe_load rather than yaml.load.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/hooks.py'
--- hooks/hooks.py 2015-08-14 00:45:46 +0000
+++ hooks/hooks.py 2015-09-16 02:56:43 +0000
@@ -223,11 +223,11 @@
223 refresh_patterns = json.loads(config_data['refresh_patterns'])223 refresh_patterns = json.loads(config_data['refresh_patterns'])
224 ## else use YAML (current):224 ## else use YAML (current):
225 except ValueError:225 except ValueError:
226 refresh_patterns = yaml.load(config_data['refresh_patterns'])226 refresh_patterns = yaml.safe_load(config_data['refresh_patterns'])
227 else:227 else:
228 refresh_patterns = {}228 refresh_patterns = {}
229 if config_data['auth_list']:229 if config_data['auth_list']:
230 auth_list = yaml.load(config_data['auth_list'])230 auth_list = yaml.safe_load(config_data['auth_list'])
231 else:231 else:
232 auth_list = []232 auth_list = []
233233
@@ -277,7 +277,7 @@
277277
278 auth_params = []278 auth_params = []
279 if config_data['auth_params']:279 if config_data['auth_params']:
280 auth_params_data = yaml.load(config_data['auth_params'])280 auth_params_data = yaml.safe_load(config_data['auth_params'])
281 for scheme in auth_params_data:281 for scheme in auth_params_data:
282 if 'children' in scheme and isinstance(scheme['children'], dict):282 if 'children' in scheme and isinstance(scheme['children'], dict):
283 children = '%d' % scheme['children']['number']283 children = '%d' % scheme['children']['number']

Subscribers

People subscribed via source and target branches

to all changes: