From 0d8b87d190bdee8d942444e2d8740bb322ca93e1 Mon Sep 17 00:00:00 2001 From: Gennady Tsitovich Date: Tue, 4 Feb 2025 08:32:27 -0800 Subject: [PATCH] Fix cherry-picking in a non-git environment. None was always passed to urlparse causing "Unable to determine host" error. Bug: b/391547354 Change-Id: I58b63b4a33135952cae102e8446eea7cb3a82531 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6226685 Commit-Queue: Gennady Tsitovich Reviewed-by: Josip Sokcevic --- git_cl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git_cl.py b/git_cl.py index 4067e8b5a..c76edbae4 100755 --- a/git_cl.py +++ b/git_cl.py @@ -4587,7 +4587,7 @@ def CMDcherry_pick(parser, args): host = None if options.host: try: - host = urllib.parse.urlparse(host).hostname + host = urllib.parse.urlparse(options.host).hostname except ValueError as e: print(f'Unable to parse host: {host}. Error: {e}', file=sys.stderr) return 1