<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Hi Corey. Changing line 54 from new_PYTHONPATH.append() to<br>.insert() doesn't seem to fix the issue.</p><p style="white-space: pre-wrap; word-wrap: break-word;">The error I encountered was:</p><p style="white-space: pre-wrap; word-wrap: break-word;">File "./runtests.py", line 56, in <module><br>from asterisk.asterisk import Asterisk<br>ImportError: No module named asterisk</p><p style="white-space: pre-wrap; word-wrap: break-word;">In my case, the error was triggered cause sys.path.append("lib/python")<br>puts lib/python at the end of the list:<br>>>> sys.path<br>['','/usr/lib64/python2.7/site-packages','lib/python']</p><p style="white-space: pre-wrap; word-wrap: break-word;">whereas sys.path.insert(1,"lib/python") puts it at the front:<br>>>> sys.path<br>['','lib/python','/usr/lib64/python2.7/site-packages']</p><p style="white-space: pre-wrap; word-wrap: break-word;">Because I also happened to have a python packaged called asterisk<br>at /usr/lib64/python2.7/site-packages, python picked it up first,<br>triggering the complaint. Line 56 is using the path from sys.path<br>for the "import" command, not from new_PYTHONPATH, therefore I<br>thought it better not to touch it.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I'm suggesting that both places should be modified in the same way.  I think my comment only matter if system environment PYTHONPATH is set and an 'asterisk' module is found within it.  Say system environment PYTHONPATH=/usr/local/mypython.  Python prepends this to the built-in sys.path. So your change would cause runtests.py to end up with sys.path:<br>['','lib/python','/usr/local/mypython','/usr/lib64/python2.7/site-packages']</p><p style="white-space: pre-wrap; word-wrap: break-word;">But the actual test processes would see:<br>['','/usr/local/mypython','lib/python','/usr/lib64/python2.7/site-packages']</p><p>Patch set 1:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.asterisk.org/10580">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.asterisk.org/10580">change 10580</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/10580"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ie7e7f4b1937676f033de8e7f9459594c2a7fcacc </div>
<div style="display:none"> Gerrit-Change-Number: 10580 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Chris Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Chris Savinovich <csavinovich@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 (1000185) </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 02 Nov 2018 11:33:15 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>