File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 3
3
from giturlparse .result import GitUrlParsed
4
4
5
5
6
- def parse (url ):
7
- return GitUrlParsed (_parse (url ))
6
+ def parse (url , check_domain = True ):
7
+ return GitUrlParsed (_parse (url , check_domain ))
8
8
9
- def validate (url ):
10
- return parse (url ).valid
9
+ def validate (url , check_domain = True ):
10
+ return parse (url , check_domain ).valid
Original file line number Diff line number Diff line change 15
15
)
16
16
17
17
18
- def parse (url ):
18
+ def parse (url , check_domain = True ):
19
19
# Values are None by default
20
20
parsed_info = defaultdict (lambda : None )
21
21
@@ -35,9 +35,10 @@ def parse(url):
35
35
# Skip if domain is bad
36
36
domain = match .group ('domain' )
37
37
#print('[%s] DOMAIN = %s' % (url, domain,))
38
- if platform .DOMAINS and not (domain in platform .DOMAINS ):
39
- #print("domain: %s not in %s" % (domain, platform.DOMAINS))
40
- continue
38
+ if check_domain :
39
+ if platform .DOMAINS and not (domain in platform .DOMAINS ):
40
+ #print("domain: %s not in %s" % (domain, platform.DOMAINS))
41
+ continue
41
42
42
43
# Get matches as dictionary
43
44
matches = match .groupdict ()
You can’t perform that action at this time.
0 commit comments