Merge ~cjwatson/rutabaga:yaml-safe-load into rutabaga:master

Proposed by Colin Watson
Status: Merged
Approved by: Colin Watson
Approved revision: e22c681470964a2cc6a31f3f7e0beb5c4ee5b375
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~cjwatson/rutabaga:yaml-safe-load
Merge into: rutabaga:master
Diff against target: 11 lines (+1/-1)
1 file modified
rutabaga/config.py (+1/-1)
Reviewer Review Type Date Requested Status
Guruprasad Approve
Review via email: mp+440893@code.launchpad.net

Commit message

Load config file using yaml.safe_load

Description of the change

Calling `yaml.load` without explicitly choosing a loader throws a warning.

To post a comment you must log in.
Revision history for this message
Guruprasad (lgp171188) wrote :

LGTM 👍🏼

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/rutabaga/config.py b/rutabaga/config.py
2index b3f993b..0839404 100644
3--- a/rutabaga/config.py
4+++ b/rutabaga/config.py
5@@ -21,5 +21,5 @@ class RutabagaConfig(object):
6 config = os.path.join(os.path.dirname(os.path.dirname(__file__)),
7 'config.yaml')
8 with open(config) as config_file:
9- defaults = yaml.load(config_file)
10+ defaults = yaml.safe_load(config_file)
11 return (os.getenv(key.upper()) or defaults.get(key.lower()) or '')

Subscribers

People subscribed via source and target branches