<p>Corey Farrell <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>(3 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;">Kinda. If passed a port and that port is not available or any of its spanne</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Maybe I'm not completely understanding but I think it would make more sense to always throw an exception if the requested ports cannot be acquired. I guess the question is what will callers do if they receive an empty list? It seems like the normal case would be for this to be a fatal error.</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;">Same reasoning as the other one (above). I was thinking span would represen</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I think replacing the argument/default 'span=0' with 'count=1' would make more sense, where 'count' would be the total number of ports required (count < 1 would be invalid).</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;">If searching for an available port and its 'spans' and nothing available ca</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Yes I think we should throw an exception, sorry for the lack of python knowledge but I don't think the code will actually throw the exception as is, it will just create it the exception object?</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 22:48:45 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>