From b53a2075ac6069827aa52021862cdc8ee110168f Mon Sep 17 00:00:00 2001 From: Ingo Schmiegel Date: Tue, 27 Oct 2015 13:38:58 +0100 Subject: [PATCH] Do not validate or parse url a) After we allow regex matching in "service =" options this is no longer required to make usage of this option feasible b) It was the wrong thing to do. Github and other services authenticate via ssh. And ~/.ssh/config allows to specify arbitrary names as "Host"s. So users can attach a certain ssh identity to a certain repo on gitlab. remote.origin.url then usually does not look like an url anymore and is meaningless tu urllib.parse. --- passport/case.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/passport/case.py b/passport/case.py index e7f779e..1fddf64 100644 --- a/passport/case.py +++ b/passport/case.py @@ -3,7 +3,6 @@ # ..................................................................... Imports import time -import urllib.parse from . import ( configuration, @@ -76,9 +75,8 @@ def gen_candidates(ids, url): yield (key, value) local_passports = config["git_passports"] - netloc = urllib.parse.urlparse(url)[1] - candidates = dict(gen_candidates(local_passports, netloc)) + candidates = dict(gen_candidates(local_passports, url)) if len(candidates) >= 1: msg = """