diff --git a/avocado/aexpect.py b/avocado/aexpect.py index 44ba4f48949990b5323ada75635810a752f46de3..ee06dcb156b4bab143f138bcaa1bf8909a08f5dc 100755 --- a/avocado/aexpect.py +++ b/avocado/aexpect.py @@ -184,7 +184,7 @@ if __name__ == "__main__": fileobj.close() # Print something to stdout so the client can start working - print "Server %s ready" % a_id + print("Server %s ready" % a_id) sys.stdout.flush() # Initialize buffers diff --git a/docs/source/Plugins.rst b/docs/source/Plugins.rst index 8219258d6d4e7c966a90b6e24833f4d414743d63..4c1172d2fb640b2b55a7c0c559de5163ec0c61de 100644 --- a/docs/source/Plugins.rst +++ b/docs/source/Plugins.rst @@ -49,7 +49,7 @@ runner, ``hello``. This is how you'd do it:: super(HelloWorld, self).configure(self.parser) def run(self, args): - print self.__doc__ + print(self.__doc__) As you can see, plugins inherit from :class:`avocado.plugins.plugin.Plugin`, that have the methods :func:`avocado.plugins.plugin.Plugin.configure` and diff --git a/examples/plugins/avocado_hello.py b/examples/plugins/avocado_hello.py index edae76765e2dfa627c2f301a2569570bfeaa2649..9318217b04d9c573bb8694f922cb8a122ab7e26d 100644 --- a/examples/plugins/avocado_hello.py +++ b/examples/plugins/avocado_hello.py @@ -23,4 +23,4 @@ class HelloWorld(plugin.Plugin): """ This method is called whenever we use the command 'hello'. """ - print self.__doc__ + print(self.__doc__) diff --git a/scripts/avocado-journal-replay b/scripts/avocado-journal-replay index 3f5819095ae21e8d7fff6ca1e9c36e2397c14a94..8cc6e375c3549598a2a37ed75051160d6ab48f11 100755 --- a/scripts/avocado-journal-replay +++ b/scripts/avocado-journal-replay @@ -69,7 +69,6 @@ class App(object): if r.status_code == 200: return True else: - print r.text return False def create_job(self, unique_id): diff --git a/selftests/all/doc/doc_build_test.py b/selftests/all/doc/doc_build_test.py index 17ec7f51fd7dcbde6c3ee57b2a2d6fe97cccd256..b975c7a96c936441dd0ba4e67b676cf017173d7d 100644 --- a/selftests/all/doc/doc_build_test.py +++ b/selftests/all/doc/doc_build_test.py @@ -35,7 +35,7 @@ def test_build_docs(): ignore_msg = False for ignore in ignore_list: if ignore in line: - print 'Expected warning ignored: %s' % line + print('Expected warning ignored: %s' % line) ignore_msg = True if ignore_msg: continue diff --git a/selftests/all/functional/avocado/basic_tests.py b/selftests/all/functional/avocado/basic_tests.py index 11b66c9d0badaca0ace4241f9d17f60448bd134c..337a7f32524cf525699470a5825463218eb47fd3 100644 --- a/selftests/all/functional/avocado/basic_tests.py +++ b/selftests/all/functional/avocado/basic_tests.py @@ -44,7 +44,7 @@ class HelloWorld(Plugin): self.parser = parser.subcommands.add_parser('hello') super(HelloWorld, self).configure(self.parser) def run(self, args): - print 'Hello World!' + print('Hello World!') """ diff --git a/selftests/all/functional/avocado/loader_tests.py b/selftests/all/functional/avocado/loader_tests.py index 2de3845d532780cb528c981a01a11787bcb0fc8a..aa8be48085bdbd272579337dc804575015226284 100644 --- a/selftests/all/functional/avocado/loader_tests.py +++ b/selftests/all/functional/avocado/loader_tests.py @@ -38,12 +38,12 @@ if __name__ == "__main__": NOT_A_TEST = """ def hello(): - print 'Hello World!' + print('Hello World!') """ PY_SIMPLE_TEST = """#!/usr/bin/python def hello(): - print 'Hello World!' + print('Hello World!') if __name__ == "__main__": hello() diff --git a/selftests/all/functional/avocado/utils_tests.py b/selftests/all/functional/avocado/utils_tests.py index b5b44bf49c366a622158a6ee53baadd193e22512..a16490bf49a75eb72588a98577e480f97cec19cf 100644 --- a/selftests/all/functional/avocado/utils_tests.py +++ b/selftests/all/functional/avocado/utils_tests.py @@ -79,8 +79,8 @@ class FakeVMStat(object): return 0 def start(self): - print "procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----" - print " r b swpd free buff cache si so bi bo in cs us sy id wa st" + print("procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----") + print(" r b swpd free buff cache si so bi bo in cs us sy id wa st") while True: r = self.get_r() b = self.get_b() @@ -99,9 +99,9 @@ class FakeVMStat(object): m_id = self.get_id() wa = self.get_wa() st = self.get_st() - print ("%2d %2d %2d %7d %6d %7d %1d %1d %2d %3d %4d %2d %2d %1d %3d %1d %1d" % - (r, b, swpd, free, buff, cache, si, so, bi, bo, m_in, cs, - us, sy, m_id, wa, st)) + print("%2d %2d %2d %7d %6d %7d %1d %1d %2d %3d %4d %2d %2d %1d %3d %1d %1d" % + (r, b, swpd, free, buff, cache, si, so, bi, bo, m_in, cs, + us, sy, m_id, wa, st)) time.sleep(self.interval) if __name__ == '__main__': @@ -111,7 +111,7 @@ if __name__ == '__main__': FAKE_UPTIME_CONTENTS = """#!/usr/bin/python if __name__ == '__main__': - print "17:56:34 up 8:06, 7 users, load average: 0.26, 0.20, 0.21" + print("17:56:34 up 8:06, 7 users, load average: 0.26, 0.20, 0.21") """ diff --git a/selftests/all/unit/avocado/loader_unittest.py b/selftests/all/unit/avocado/loader_unittest.py index 8df64cac4fc775e2f7db02668bf51641cb99d62b..cabf915d5f3283ff7d31ad40dc93290d2007f93a 100755 --- a/selftests/all/unit/avocado/loader_unittest.py +++ b/selftests/all/unit/avocado/loader_unittest.py @@ -42,12 +42,12 @@ if __name__ == "__main__": NOT_A_TEST = """ def hello(): - print 'Hello World!' + print('Hello World!') """ PY_SIMPLE_TEST = """#!/usr/bin/python def hello(): - print 'Hello World!' + print('Hello World!') if __name__ == "__main__": hello()