Fix str(None) bug in port detection for hook setup
1) when git-review -s is launched it tries to detect information for scp-ing the commit-msg hook from remote. 2) when remote url does not contains port (':number') we'll get None from urlparse. 3) just before passing it further it was always converted to string (and so we could get 'None') 4) Later if port is not None, we add '-P {port}' to the scp command. Which caused scp failure with message 'Bad port None'. So we convert port to str only if it's not None. Change-Id: I64c7a197844027cb24c13817d6c3186009568e8a
This commit is contained in:
parent
8cebdcdb12
commit
19e9eb0f3f
@ -386,7 +386,10 @@ def parse_git_show(remote, verb):
|
||||
if parsed_url.scheme == "ssh" and port is None:
|
||||
port = 22
|
||||
|
||||
return (hostname, username, str(port), project_name)
|
||||
if port is not None:
|
||||
port = str(port)
|
||||
|
||||
return (hostname, username, port, project_name)
|
||||
|
||||
|
||||
def check_color_support():
|
||||
|
Loading…
x
Reference in New Issue
Block a user