X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=test%2Fvpp_papi_provider.py;h=eecf6e257e8dc14fab454f17e8cee480efeffe40;hb=00671cf9cfbcd9ed25d79712bf01d29cb8787bf2;hp=f1e53177af2c3e963327dd4bc045bebb64e72242;hpb=61e63bf4e14eddebdd99814cf2633c2e638cd21c;p=vpp.git diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py index f1e53177af2..eecf6e257e8 100644 --- a/test/vpp_papi_provider.py +++ b/test/vpp_papi_provider.py @@ -1,9 +1,12 @@ -import os import fnmatch +import os import time -from hook import Hook from collections import deque +import six + +from hook import Hook + # Sphinx creates auto-generated documentation by importing the python source # files and collecting the docstrings from them. The NO_VPP_PAPI flag allows # the vpp_papi_provider.py file to be importable without having to build @@ -184,14 +187,14 @@ class VppPapiProvider(object): if hasattr(reply, 'retval') and reply.retval >= 0: msg = "API call passed unexpectedly: expected negative "\ "return value instead of %d in %s" % \ - (reply.retval, repr(reply)) + (reply.retval, six.reprlib(reply)) self.test_class.logger.info(msg) raise UnexpectedApiReturnValueError(msg) elif self._expect_api_retval == self._zero: if hasattr(reply, 'retval') and reply.retval != expected_retval: msg = "API call failed, expected %d return value instead "\ "of %d in %s" % (expected_retval, reply.retval, - repr(reply)) + six.reprlib(reply)) self.test_class.logger.info(msg) raise UnexpectedApiReturnValueError(msg) else: