From f745f0655b36f6ef1caf2ae057f822038d1d44d9 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sat, 30 Nov 2019 11:20:06 +0100 Subject: [PATCH] qa/coccinelle: port struct-flags.py to Python3 --- qa/coccinelle/struct-flags.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/qa/coccinelle/struct-flags.py b/qa/coccinelle/struct-flags.py index e7a3b63940..81fa09aa84 100755 --- a/qa/coccinelle/struct-flags.py +++ b/qa/coccinelle/struct-flags.py @@ -42,16 +42,16 @@ struct%d->%s@p1 &= ~struct_flags%d i += 1 -print header -print "position p1;" -print "@@" -print "" -print "(" + "|".join(body) + ")" -print "" -print """@script:python@ +print(header) +print("position p1;") +print("@@") +print("") +print("(" + "|".join(body) + ")") +print("") +print("""@script:python@ p1 << flags.p1; @@ print "Invalid usage of flags field at %s:%s, flags value is incorrect (wrong family)." % (p1[0].file, p1[0].line) import sys -sys.exit(1)""" +sys.exit(1)""")