[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230814060704.79655-4-bgray@linux.ibm.com>
Date: Mon, 14 Aug 2023 16:06:59 +1000
From: Benjamin Gray <bgray@...ux.ibm.com>
To: linux-kernel@...r.kernel.org, linux-ia64@...r.kernel.org,
linux-doc@...r.kernel.org, bpf@...r.kernel.org,
linux-pm@...r.kernel.org
Cc: abbotti@....co.uk, hsweeten@...ionengravers.com,
jan.kiszka@...mens.com, kbingham@...nel.org, mykolal@...com,
Benjamin Gray <bgray@...ux.ibm.com>
Subject: [PATCH 3/8] drivers/comedi: fix Python string escapes
Python 3.6 introduced a DeprecationWarning for invalid escape sequences.
This is upgraded to a SyntaxWarning in Python 3.12, and will eventually
be a syntax error.
Fix these now to get ahead of it before it's an error.
Signed-off-by: Benjamin Gray <bgray@...ux.ibm.com>
---
drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
index 90378fb50580..3d124a887be9 100755
--- a/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
+++ b/drivers/comedi/drivers/ni_routing/tools/convert_csv_to_c.py
@@ -44,7 +44,7 @@ def routedict_to_structinit_single(name, D, return_name=False):
lines.append('\t\t[B({})] = {{'.format(D0_sig))
for D1_sig, value in D1:
- if not re.match('[VIU]\([^)]*\)', value):
+ if not re.match('[VIU]\\([^)]*\\)', value):
sys.stderr.write('Invalid register format: {}\n'.format(repr(value)))
sys.stderr.write(
'Register values should be formatted with V(),I(),or U()\n')
--
2.41.0
Powered by blists - more mailing lists