diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 557: Fix for bug #1119225 Use safe_load to load YAML files.

Message ID 20130211054713.12411.16748.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Senthil Kumaran Feb. 11, 2013, 5:47 a.m. UTC
------------------------------------------------------------
revno: 557
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Mon 2013-02-11 08:01:22 +0530
message:
  Fix for bug #1119225 Use safe_load to load YAML files.
modified:
  lava_dispatcher/actions/lava_test_shell.py
  lava_dispatcher/lava_test_shell.py


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_dispatcher/actions/lava_test_shell.py'
--- lava_dispatcher/actions/lava_test_shell.py	2013-01-28 08:51:59 +0000
+++ lava_dispatcher/actions/lava_test_shell.py	2013-02-11 02:31:22 +0000
@@ -244,7 +244,7 @@ 
         testdef_file = download_image(url, self.context, tmpdir)
         with open(testdef_file, 'r') as f:
             logging.info('loading test definition')
-            testdef = yaml.load(f)
+            testdef = yaml.safe_load(f)
 
         idx = len(self.testdefs)
 
@@ -270,7 +270,7 @@ 
         test = testdef_repo.get('testdef', 'lavatest.yaml')
         with open(os.path.join(repo, test), 'r') as f:
             logging.info('loading test definition ...')
-            testdef = yaml.load(f)
+            testdef = yaml.safe_load(f)
 
         idx = len(self.testdefs)
         self._append_testdef(

=== modified file 'lava_dispatcher/lava_test_shell.py'
--- lava_dispatcher/lava_test_shell.py	2013-01-30 05:33:55 +0000
+++ lava_dispatcher/lava_test_shell.py	2013-02-11 02:31:22 +0000
@@ -295,8 +295,8 @@ 
     # XXX testdef_metadata = _read_content(os.path.join(test_run_dir,
     # XXX                                              'testdef_metadata'))
 
-    testdef = yaml.load(testdef)
-    # XXX testdef_metadata = yaml.load(testdef_metadata)
+    testdef = yaml.safe_load(testdef)
+    # XXX testdef_metadata = yaml.safe_load(testdef_metadata)
     if uuid in testdefs_by_uuid:
         sw_sources = testdefs_by_uuid[uuid]._sw_sources
     else: