diff mbox series

[1/3] devtool/standard: correctly escape \

Message ID 20240105133543.3017997-1-alex@linutronix.de
State Accepted, archived
Commit bafb4b4edb4fb7908fdda272b7b2c2cbdef4728b
Headers show
Series [1/3] devtool/standard: correctly escape \ | expand

Commit Message

Alexander Kanavin Jan. 5, 2024, 1:35 p.m. UTC
python 3.12 points out that:

SyntaxWarning: invalid escape sequence '\*'

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 scripts/lib/devtool/standard.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 559fd45676c..c20c0321a35 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -772,7 +772,7 @@  def get_staging_kver(srcdir):
 def get_staging_kbranch(srcdir):
     staging_kbranch = ""
     if os.path.exists(srcdir) and os.listdir(srcdir):
-        (branch, _) = bb.process.run('git branch | grep \* | cut -d \' \' -f2', cwd=srcdir)
+        (branch, _) = bb.process.run('git branch | grep \\* | cut -d \' \' -f2', cwd=srcdir)
         staging_kbranch = "".join(branch.split('\n')[0])
     return staging_kbranch