Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Fix checking for config.proxy_username #47

Merged
merged 1 commit into from Mar 30, 2016
Merged

Fix checking for config.proxy_username #47

merged 1 commit into from Mar 30, 2016

Conversation

yhekma
Copy link
Contributor

@yhekma yhekma commented Mar 24, 2016

When using basic authentication for the url to fetch and using a proxy without authentication, all the authentication gets stripped away when the proxy_username exists in the config file /etc/pulp/server/plugins.conf/yum_importer.json but is empty. This is because in threaded.py the code checks if proxy_username == None, which is untrue (it is an empty string). Since

variable = ''
if variable:
  do_something

evaluates works as well, this is the better option in my opinion.

@bowlofeggs
Copy link
Contributor

I think this makes sense, I doubt any proxy server allows the empty string as a username. Thanks for your contribution!

@bowlofeggs bowlofeggs merged commit 3992b12 into pulp:master Mar 30, 2016
@bowlofeggs
Copy link
Contributor

I added a unit test for this PR in #48

@bowlofeggs
Copy link
Contributor

I filed a ticket about this issue: https://pulp.plan.io/issues/1820

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants