File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1381,9 +1381,9 @@ def formaturl(url, format="default"):
1381
1381
if format == "ssh" :
1382
1382
url = 'ssh://%s%s/%s.git' % (m .group (2 ) or 'git@' , m .group (6 ), m .group (7 ))
1383
1383
elif format == "http" :
1384
- url = 'http://%s%s/%s' % (m .group (2 ) if m .group (5 ) or m .group (3 ) != 'git' else '' , m .group (6 ), m .group (7 ))
1384
+ url = 'http://%s%s/%s' % (m .group (2 ) if ( m .group (2 ) and ( m . group ( 5 ) or m .group (3 ) != 'git' )) else '' , m .group (6 ), m .group (7 ))
1385
1385
elif format == "https" :
1386
- url = 'https://%s%s/%s' % (m .group (2 ) if m .group (5 ) or m .group (3 ) != 'git' else '' , m .group (6 ), m .group (7 ))
1386
+ url = 'https://%s%s/%s' % (m .group (2 ) if ( m .group (2 ) and ( m . group ( 5 ) or m .group (3 ) != 'git' )) else '' , m .group (6 ), m .group (7 ))
1387
1387
else :
1388
1388
m = re .match (regex_hg_url , url )
1389
1389
if m :
You can’t perform that action at this time.
0 commit comments