<p>George Joseph has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/testsuite/+/16592">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">asterisk.py: Fix TypeError when replacing instanceid<br><br>id = 23<br>value = "test <<instanceid>> test"<br>value.replace("<<instanceid>>", id) fails with a TypeError because<br>replace doesn't automatically convert the numeric replacement<br>argument to a string.<br><br>Now doing value.replace("<<instanceid>>", str(id))<br><br>ASTERISK-29675<br><br>Change-Id: I16ec4dc84303ae3c3bdd1884959559675f6143c8<br>---<br>M lib/python/asterisk/asterisk.py<br>1 file changed, 1 insertion(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/92/16592/1</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 f1371db..08c4e9a 100644</span><br><span>--- a/lib/python/asterisk/asterisk.py</span><br><span>+++ b/lib/python/asterisk/asterisk.py</span><br><span>@@ -675,7 +675,7 @@</span><br><span> for key in self.directories.keys():</span><br><span> value = value.replace("<<%s>>" % key,</span><br><span> "%s%s" % (self.base, self.directories[key]))</span><br><span style="color: hsl(0, 100%, 40%);">- value = value.replace("<<instanceid>>", self.instance_id)</span><br><span style="color: hsl(120, 100%, 40%);">+ value = value.replace("<<instanceid>>", str(self.instance_id))</span><br><span> return value</span><br><span> </span><br><span> # Quick little function for doing search and replace in a file used below.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/testsuite/+/16592">change 16592</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/+/16592"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: testsuite </div>
<div style="display:none"> Gerrit-Branch: 18 </div>
<div style="display:none"> Gerrit-Change-Id: I16ec4dc84303ae3c3bdd1884959559675f6143c8 </div>
<div style="display:none"> Gerrit-Change-Number: 16592 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>