diff mbox series

[7/9] fetch2/sftp: fix port and remote command arguments

Message ID 20260625070750.2757558-8-anders.heimer@est.tech
State New
Headers show
Series Follow-up fixes for command argument conversions | expand

Commit Message

Anders Heimer June 25, 2026, 7:07 a.m. UTC
Signed-off-by: Anders Heimer <anders.heimer@est.tech>
---
 lib/bb/fetch2/sftp.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lib/bb/fetch2/sftp.py b/lib/bb/fetch2/sftp.py
index 959dc6ec2..82c76bb66 100644
--- a/lib/bb/fetch2/sftp.py
+++ b/lib/bb/fetch2/sftp.py
@@ -85,7 +85,7 @@  class SFTP(FetchMethod):
         urlo = URI(ud.url)
         basecmd = ['sftp', '-oBatchMode=yes']
         if urlo.port:
-            basecmd += ['-P', urlo.port]
+            basecmd += ['-P', str(urlo.port)]
             urlo.port = None
 
         dldir = d.getVar('DL_DIR')
@@ -102,7 +102,7 @@  class SFTP(FetchMethod):
         if path[:3] == '/~/':
             path = path[3:]
 
-        remote = '"%s%s:%s"' % (user, urlo.hostname, path)
+        remote = '%s%s:%s' % (user, urlo.hostname, path)
 
         cmd = basecmd + [remote, lpath]