Allow space in SCM password. Fixes https://trello.com/c/KaqasZPa

This commit is contained in:
Chris Church
2014-12-16 14:38:50 -05:00
parent c014399d6e
commit 41ac7c4d96

View File

@@ -10,6 +10,7 @@ import re
import subprocess import subprocess
import stat import stat
import sys import sys
import urllib
import urlparse import urlparse
import threading import threading
import contextlib import contextlib
@@ -235,7 +236,7 @@ def update_scm_url(scm_type, url, username=True, password=True,
netloc_password = '' netloc_password = ''
if netloc_username and parts.scheme != 'file': if netloc_username and parts.scheme != 'file':
netloc = u':'.join(filter(None, [netloc_username, netloc_password])) netloc = u':'.join([urllib.quote(x) for x in (netloc_username, netloc_password) if x])
else: else:
netloc = u'' netloc = u''
netloc = u'@'.join(filter(None, [netloc, parts.hostname])) netloc = u'@'.join(filter(None, [netloc, parts.hostname]))