summaryrefslogtreecommitdiffstats
path: root/support/testing/infra/basetest.py
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2018-06-03 11:08:21 +0200
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>2018-06-10 15:56:25 +0200
commit99723554c0c84002c25e98eb187fa667abee4ced (patch)
treea52bfef0dc46d4bde1d260515d29d981c4060146 /support/testing/infra/basetest.py
parenta1f4421cc7d6c4c1a7678bcca477ac311d0b4116 (diff)
downloadbuildroot-99723554c0c84002c25e98eb187fa667abee4ced.tar.gz
buildroot-99723554c0c84002c25e98eb187fa667abee4ced.zip
support/testing: fix python syntax
Fix three issues with code style in our test infra: - 'print' is now a function, - exceptions need to be caught-assigned with the 'as' keyword, - old-style "%s"%() formatting is deprecated. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com> [Thomas: drop indices in format strings.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'support/testing/infra/basetest.py')
-rw-r--r--support/testing/infra/basetest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/support/testing/infra/basetest.py b/support/testing/infra/basetest.py
index f3f13ad97f..5014fefafa 100644
--- a/support/testing/infra/basetest.py
+++ b/support/testing/infra/basetest.py
@@ -46,8 +46,8 @@ class BRTest(unittest.TestCase):
self.config += "\nBR2_JLEVEL={}\n".format(self.jlevel)
def show_msg(self, msg):
- print "{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
- self.testname, msg)
+ print("{} {:40s} {}".format(datetime.datetime.now().strftime("%H:%M:%S"),
+ self.testname, msg))
def setUp(self):
self.show_msg("Starting")
OpenPOWER on IntegriCloud