<p>Friendly Automation <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/11599">View Change</a></p><div style="white-space:pre-wrap">Approvals:
George Joseph: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lib/python: asterisk.voicemail compatibility of maxint for Python 3:<br><br>maxint was remove in Python 3. This change include a port compatibility<br>for this function for Python 3 using maxsize.<br><br>This is accord to the python3 compatibility done in<br>ChangeId: If76c2d3e11e4ab4552d0df7841287c8bb2de7918<br><br>Change-Id: Ie321376d7234ff054dfb9964f5995866879199a3<br>---<br>M lib/python/asterisk/voicemail.py<br>1 file changed, 9 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/lib/python/asterisk/voicemail.py b/lib/python/asterisk/voicemail.py</span><br><span>index 3c4c7d5..0c1c088 100644</span><br><span>--- a/lib/python/asterisk/voicemail.py</span><br><span>+++ b/lib/python/asterisk/voicemail.py</span><br><span>@@ -429,8 +429,16 @@</span><br><span> 'c': context, 'm': mailbox, 'f': folder, 'n': msg_env_name})</span><br><span> </span><br><span> random.seed()</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ # `maxint` was removed in Python 3</span><br><span style="color: hsl(120, 100%, 40%);">+ # https://docs.python.org/3.0/whatsnew/3.0.html#integers</span><br><span style="color: hsl(120, 100%, 40%);">+ if sys.version_info.major == 2:</span><br><span style="color: hsl(120, 100%, 40%);">+ maxint = sys.maxint</span><br><span style="color: hsl(120, 100%, 40%);">+ else:</span><br><span style="color: hsl(120, 100%, 40%);">+ maxint = sys.maxsize</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> msg_id = (str(int(time.time())) + "-" +</span><br><span style="color: hsl(0, 100%, 40%);">- str(random.randrange(0, 1, sys.maxint - 1)))</span><br><span style="color: hsl(120, 100%, 40%);">+ str(random.randrange(0, 1, maxint - 1)))</span><br><span> </span><br><span> with open(msg_env_path, 'w') as envelope_file:</span><br><span> envelope_file.write(';\n')</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/11599">change 11599</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/+/11599"/><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: Ie321376d7234ff054dfb9964f5995866879199a3 </div>
<div style="display:none"> Gerrit-Change-Number: 11599 </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: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>