<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/11424">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Sean Bright: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">asterisk.py: Bugfix for select directory with most space<br><br>To select the directory with more available space is used the sorted<br>function with os.statvfs and sorted result in order [0, 1, 2,...]<br><br>As we need the directory with more space in the first position.<br>For this change the sorted by the reverse order. This patch fix<br>this condition.<br><br>Change-Id: I19ad9c2ba83cdbb1977938fa8287cb413372be1e<br>---<br>M lib/python/asterisk/asterisk.py<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lib/python/asterisk/asterisk.py b/lib/python/asterisk/asterisk.py</span><br><span>index db21172..131a0ab 100644</span><br><span>--- a/lib/python/asterisk/asterisk.py</span><br><span>+++ b/lib/python/asterisk/asterisk.py</span><br><span>@@ -324,7 +324,10 @@</span><br><span> best_tmp = os.getenv("AST_WORK_DIR")</span><br><span> if not best_tmp:</span><br><span> # select tmp path with most available space</span><br><span style="color: hsl(0, 100%, 40%);">- best_tmp = sorted(['/tmp', '/var/tmp'], key=lambda path: os.statvfs(path).f_bavail)[0]</span><br><span style="color: hsl(120, 100%, 40%);">+ best_tmp = sorted(['/tmp', '/var/tmp'],</span><br><span style="color: hsl(120, 100%, 40%);">+ key=lambda path: os.statvfs(path).f_bavail,</span><br><span style="color: hsl(120, 100%, 40%);">+ reverse=True)[0]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # Base location of the temporary files created by the testsuite</span><br><span> test_suite_root = best_tmp + "/asterisk-testsuite"</span><br><span> # The default etc directory for Asterisk</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/11424">change 11424</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/+/11424"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 13 </div>
<div style="display:none"> Gerrit-Change-Id: I19ad9c2ba83cdbb1977938fa8287cb413372be1e </div>
<div style="display:none"> Gerrit-Change-Number: 11424 </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-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>