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
1=== modified file 'hooks/hooks.py'
2--- hooks/hooks.py 2015-08-14 00:45:46 +0000
3+++ hooks/hooks.py 2015-09-16 02:56:43 +0000
4@@ -223,11 +223,11 @@
5 refresh_patterns = json.loads(config_data['refresh_patterns'])
6 ## else use YAML (current):
7 except ValueError:
8- refresh_patterns = yaml.load(config_data['refresh_patterns'])
9+ refresh_patterns = yaml.safe_load(config_data['refresh_patterns'])
10 else:
11 refresh_patterns = {}
12 if config_data['auth_list']:
13- auth_list = yaml.load(config_data['auth_list'])
14+ auth_list = yaml.safe_load(config_data['auth_list'])
15 else:
16 auth_list = []
17
18@@ -277,7 +277,7 @@
19
20 auth_params = []
21 if config_data['auth_params']:
22- auth_params_data = yaml.load(config_data['auth_params'])
23+ auth_params_data = yaml.safe_load(config_data['auth_params'])
24 for scheme in auth_params_data:
25 if 'children' in scheme and isinstance(scheme['children'], dict):
26 children = '%d' % scheme['children']['number']

Subscribers

People subscribed via source and target branches

to all changes: