<p>Rodrigo Ramirez Norambuena has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/11308">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Remove YAMLLoadWarning: calling yaml.load()<br><br>>From PyYAML 5.1 yaml.load(x) the use as plain is deprecated<br><br>This change use a SafeLoader as Loader for the yaml.load called function<br><br>Info: https://msg.pyyaml.org/load<br>Change-Id: I2d4ef93ad0c8503040e4a673d819f5a0c075f0f6<br>---<br>M lib/python/asterisk/test_config.py<br>M runtests.py<br>2 files changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/08/11308/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lib/python/asterisk/test_config.py b/lib/python/asterisk/test_config.py</span><br><span>index 6d2318d..4860cb3 100644</span><br><span>--- a/lib/python/asterisk/test_config.py</span><br><span>+++ b/lib/python/asterisk/test_config.py</span><br><span>@@ -374,7 +374,7 @@</span><br><span> </span><br><span> test_config = "%s/test-config.yaml" % self.test_name</span><br><span> with open(test_config, "r") as config_file:</span><br><span style="color: hsl(0, 100%, 40%);">- self.config = yaml.load(config_file)</span><br><span style="color: hsl(120, 100%, 40%);">+ self.config = yaml.load(config_file, Loader=yaml.SafeLoader)</span><br><span> </span><br><span> if not self.config:</span><br><span> print("ERROR: Failed to load configuration for test '%s'" %</span><br><span>diff --git a/runtests.py b/runtests.py</span><br><span>index d1bc4aa..fe04213 100755</span><br><span>--- a/runtests.py</span><br><span>+++ b/runtests.py</span><br><span>@@ -772,7 +772,7 @@</span><br><span> print("Unexpected error: %s" % sys.exc_info()[0])</span><br><span> return None</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- config = yaml.load(f)</span><br><span style="color: hsl(120, 100%, 40%);">+ config = yaml.load(f, Loader=yaml.SafeLoader)</span><br><span> f.close()</span><br><span> </span><br><span> return config</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/11308">change 11308</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/testsuite/+/11308"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2d4ef93ad0c8503040e4a673d819f5a0c075f0f6 </div>
<div style="display:none"> Gerrit-Change-Number: 11308 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Rodrigo Ramirez Norambuena <a@rodrigoramirez.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>