forked from openlp/openlp
Fixes
This commit is contained in:
parent
dce509e909
commit
fac5d4b798
@ -91,9 +91,9 @@ def get_proxy_settings(mode=None):
|
|||||||
basic_auth = '{username}:{password}@'.format(username=username, password=password)
|
basic_auth = '{username}:{password}@'.format(username=username, password=password)
|
||||||
http_value = None
|
http_value = None
|
||||||
https_value = None
|
https_value = None
|
||||||
if http_addr is not None:
|
if http_addr:
|
||||||
http_value = 'http://{basic_auth}{http_addr}'.format(basic_auth=basic_auth, http_addr=http_addr)
|
http_value = 'http://{basic_auth}{http_addr}'.format(basic_auth=basic_auth, http_addr=http_addr)
|
||||||
if https_addr is not None:
|
if https_addr:
|
||||||
https_value = 'https://{basic_auth}{https_addr}'.format(basic_auth=basic_auth, https_addr=https_addr)
|
https_value = 'https://{basic_auth}{https_addr}'.format(basic_auth=basic_auth, https_addr=https_addr)
|
||||||
return {'http': http_value, 'https': https_value}
|
return {'http': http_value, 'https': https_value}
|
||||||
|
|
||||||
|
@ -199,6 +199,7 @@ def get_repo_name():
|
|||||||
"""
|
"""
|
||||||
This returns the name of branch of the working directory. For example it returns *lp:~googol/openlp/render*.
|
This returns the name of branch of the working directory. For example it returns *lp:~googol/openlp/render*.
|
||||||
"""
|
"""
|
||||||
|
return 'lp:~phill-ridout/openlp/proxies'
|
||||||
# Run the bzr command.
|
# Run the bzr command.
|
||||||
bzr = Popen(('bzr', 'info'), stdout=PIPE, stderr=PIPE)
|
bzr = Popen(('bzr', 'info'), stdout=PIPE, stderr=PIPE)
|
||||||
raw_output, error = bzr.communicate()
|
raw_output, error = bzr.communicate()
|
||||||
|
@ -349,8 +349,8 @@ class TestGetProxySettings(TestCase, TestMixin):
|
|||||||
"""
|
"""
|
||||||
# GIVEN: A `proxy mode` setting of MANUAL_PROXY with no servers specified
|
# GIVEN: A `proxy mode` setting of MANUAL_PROXY with no servers specified
|
||||||
Settings().setValue('advanced/proxy mode', ProxyMode.MANUAL_PROXY)
|
Settings().setValue('advanced/proxy mode', ProxyMode.MANUAL_PROXY)
|
||||||
Settings().setValue('advanced/proxy http', None)
|
Settings().setValue('advanced/proxy http', '')
|
||||||
Settings().setValue('advanced/proxy https', None)
|
Settings().setValue('advanced/proxy https', '')
|
||||||
Settings().setValue('advanced/proxy username', 'user')
|
Settings().setValue('advanced/proxy username', 'user')
|
||||||
Settings().setValue('advanced/proxy password', 'pass')
|
Settings().setValue('advanced/proxy password', 'pass')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user