← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Colin Watson has proposed merging ~cjwatson/rutabaga:yaml-safe-load into rutabaga:master.

Commit message:
Load config file using yaml.safe_load

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/rutabaga/+git/rutabaga/+merge/440893

Calling `yaml.load` without explicitly choosing a loader throws a warning.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/rutabaga:yaml-safe-load into rutabaga:master.
diff --git a/rutabaga/config.py b/rutabaga/config.py
index b3f993b..0839404 100644
--- a/rutabaga/config.py
+++ b/rutabaga/config.py
@@ -21,5 +21,5 @@ class RutabagaConfig(object):
         config = os.path.join(os.path.dirname(os.path.dirname(__file__)),
                               'config.yaml')
         with open(config) as config_file:
-            defaults = yaml.load(config_file)
+            defaults = yaml.safe_load(config_file)
             return (os.getenv(key.upper()) or defaults.get(key.lower()) or '')