<p>Kevin Harwell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/8691">View Change</a></p><p>Patch set 5:</p><p>(4 comments)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py">File lib/python/asterisk/utils_socket.py:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py@222">Patch Set #5, Line 222:</a> <code style="font-family:monospace,monospace"> empty list.</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Maybe I'm not completely understanding but I think it would make more sense</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I think you're probably correct. I'll change it to throw an exception if not found (if port is 0 or otherwise).</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py@233">Patch Set #5, Line 233:</a> <code style="font-family:monospace,monospace"> ports = self.get_avail(host, range(port[0] + 1, port[0] + span +</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I think replacing the argument/default 'span=0' with 'count=1' would make m</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Okay will change it then. I've been allowing a negative span just in case someone ever wants the port and the 'span' ports just before port.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Still easy to change though. If someone happens to pass in 0 I'll just convert it to a 1.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py@238">Patch Set #5, Line 238:</a> <code style="font-family:monospace,monospace"> PortError(socktype, family, attempts)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Yes I think we should throw an exception, sorry for the lack of python know</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Oh haha my eyes totally missed that. You are indeed correct. It just creates the object but doesn't raise the exception.</p></li><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/8691/5/lib/python/asterisk/utils_socket.py@259">Patch Set #5, Line 259:</a> <code style="font-family:monospace,monospace"> res = self.get_spanned(host, port, socktype, family, span, attempts)</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">It may be good to check for an empty list here.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">for the return? No need as the call to reserve can handle an empty list and then empty or not res would be the value we want returned.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/8691">change 8691</a>. To unsubscribe, 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/8691"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I3da461123afc30e1f5ca12e65d289eaa42d6de00 </div>
<div style="display:none"> Gerrit-Change-Number: 8691 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 18 Apr 2018 23:22:01 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>