[Concept,08/37] patman: Strip trailing slash from patchwork URLs

Message ID 20260404213020.372253-9-sjg@u-boot.org
State New
Headers
Series patman: Autolink fixes and AI-assisted patch review |

Commit Message

Simon Glass April 4, 2026, 9:28 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Normalise the patchwork URL by stripping any trailing slash, so that
API paths are constructed without a double slash. Guard against None
URLs which can occur when patchwork is not configured.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/patman/patchwork.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/tools/patman/patchwork.py b/tools/patman/patchwork.py
index 627af08a723..5192b817968 100644
--- a/tools/patman/patchwork.py
+++ b/tools/patman/patchwork.py
@@ -174,7 +174,7 @@  class Patchwork:
             url (str): URL of patchwork server, e.g.
                'https://patchwork.ozlabs.org'
         """
-        self.url = url
+        self.url = url.rstrip('/') if url else url
         self.fake_request = None
         self.proj_id = None
         self.link_name = None