Skip to content

Commit 1e76144

Browse files
committed
Use urlparse to remove auth information
1 parent 3adf9d7 commit 1e76144

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mbed/mbed.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,9 @@ def write(self):
11421142
self.rev if self.rev else ''))
11431143
action("Updating reference \"%s\" -> \"%s\"" % (relpath(cwd_root, self.path) if cwd_root != self.path else self.name, ref))
11441144
with open(self.lib, 'wb') as f:
1145-
f.write(re.sub(r'://.*@', '://', ref) + '\n')
1145+
with_auth = urlparse(ref)
1146+
f.write(with_auth._repalce(netloc=with_auth.hostname).geturl())
1147+
f.write("\n")
11461148

11471149
def rm_untracked(self):
11481150
untracked = self.scm.untracked()

0 commit comments

Comments
 (0)