Repository: qpid-interop-test
Updated Branches:
  refs/heads/master 69cb5a213 -> 3545a9fb7


QPIDIT-34: Fixed issue with trailing carriage return no longer present in 
latest versions of jsoncpp - added explicit test for trailing carraige return 
before removing it


Project: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/commit/3545a9fb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/tree/3545a9fb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-interop-test/diff/3545a9fb

Branch: refs/heads/master
Commit: 3545a9fb748f3e10b5dd66aaed2cb814a12aa4f6
Parents: 69cb5a2
Author: Kim van der Riet <[email protected]>
Authored: Wed Jun 15 15:57:23 2016 -0400
Committer: Kim van der Riet <[email protected]>
Committed: Wed Jun 15 15:57:23 2016 -0400

----------------------------------------------------------------------
 src/python/qpid-interop-test/jms/jms_message_tests.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-interop-test/blob/3545a9fb/src/python/qpid-interop-test/jms/jms_message_tests.py
----------------------------------------------------------------------
diff --git a/src/python/qpid-interop-test/jms/jms_message_tests.py 
b/src/python/qpid-interop-test/jms/jms_message_tests.py
index e487617..4adf049 100755
--- a/src/python/qpid-interop-test/jms/jms_message_tests.py
+++ b/src/python/qpid-interop-test/jms/jms_message_tests.py
@@ -285,13 +285,14 @@ class Shim(object):
             #print '\n>>>', arg_list # DEBUG - useful to see command-line sent 
to shim
             output = check_output(arg_list)
             #print '<<<', output # DEBUG- useful to see text received from shim
-            str_tvl = output.split('\n')[:-1] # remove trailing \n
+            str_tvl = output.split('\n')
+            if str_tvl[-1] == '': # Trailing \n
+                str_tvl = str_tvl[:-1] # remove last empty string caused by 
trailing /n
             if len(str_tvl) == 1:
                 return output
             if len(str_tvl) == 2:
                 return loads(str_tvl[1])
-            else:
-                return loads("".join(str_tvl[1:]))
+            return loads("".join(str_tvl[1:]))
         except CalledProcessError as exc:
             return str(exc) + '\n\n' + exc.output
         except Exception as exc:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to