diff --git a/openlp/core/common/httputils.py b/openlp/core/common/httputils.py index 40077f630..69310c327 100644 --- a/openlp/core/common/httputils.py +++ b/openlp/core/common/httputils.py @@ -91,9 +91,9 @@ def get_proxy_settings(mode=None): basic_auth = '{username}:{password}@'.format(username=username, password=password) http_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) - 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) return {'http': http_value, 'https': https_value} diff --git a/scripts/jenkins_script.py b/scripts/jenkins_script.py index 5a1e67c45..9fa1bfdb3 100755 --- a/scripts/jenkins_script.py +++ b/scripts/jenkins_script.py @@ -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*. """ + return 'lp:~phill-ridout/openlp/proxies' # Run the bzr command. bzr = Popen(('bzr', 'info'), stdout=PIPE, stderr=PIPE) raw_output, error = bzr.communicate() diff --git a/tests/functional/openlp_core/common/test_httputils.py b/tests/functional/openlp_core/common/test_httputils.py index 1a979454c..a24f39967 100644 --- a/tests/functional/openlp_core/common/test_httputils.py +++ b/tests/functional/openlp_core/common/test_httputils.py @@ -349,8 +349,8 @@ class TestGetProxySettings(TestCase, TestMixin): """ # GIVEN: A `proxy mode` setting of MANUAL_PROXY with no servers specified Settings().setValue('advanced/proxy mode', ProxyMode.MANUAL_PROXY) - Settings().setValue('advanced/proxy http', None) - Settings().setValue('advanced/proxy https', None) + Settings().setValue('advanced/proxy http', '') + Settings().setValue('advanced/proxy https', '') Settings().setValue('advanced/proxy username', 'user') Settings().setValue('advanced/proxy password', 'pass')