<p>Neels Hofmeyr has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10866">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">osmo_interact/common: ignore trailing empty lines in received results<br><br>If the VTY/CTRL output contains trailing newlines, do not cause those to<br>trigger mismatch errors, rather drop those.<br><br>Rationale: in transcript scripts, the amount of empty lines between expected<br>results is ignored, to allow cosmetically arranging into sections. So trailing<br>newlines are dropped, and there is no way to preserve those.<br><br>Change-Id: I1930868451c5738b17e318a9807590d948210b9a<br>---<br>M osmopy/osmo_interact/common.py<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/python/osmo-python-tests refs/changes/66/10866/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/osmopy/osmo_interact/common.py b/osmopy/osmo_interact/common.py</span><br><span>index 31f44a8..349051e 100644</span><br><span>--- a/osmopy/osmo_interact/common.py</span><br><span>+++ b/osmopy/osmo_interact/common.py</span><br><span>@@ -268,6 +268,10 @@</span><br><span>             e += 1</span><br><span>             g += 1</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+        # ignore final empty lines, we also strip empty lines from the expected string</span><br><span style="color: hsl(120, 100%, 40%);">+        while g < len(got) and not got[g]:</span><br><span style="color: hsl(120, 100%, 40%);">+            g += 1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>         if g < len(got):</span><br><span>             return 'Did not expect line %r' % got[g]</span><br><span>         return True</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10866">change 10866</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/10866"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: python/osmo-python-tests </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I1930868451c5738b17e318a9807590d948210b9a </div>
<div style="display:none"> Gerrit-Change-Number: 10866 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>