Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing HTTP authentication for downloading WordPress blog content #1848

Merged
merged 1 commit into from Jun 29, 2015

Conversation

@felixfontein
Copy link
Contributor

@felixfontein felixfontein commented Jun 27, 2015

Also providing error messages when not downloading instead of storing error message in destination file.

Also providing error messages when not downloading instead of storing error message in destination file.
felixfontein added a commit that referenced this pull request Jun 29, 2015
Allowing HTTP authentication for downloading WordPress blog content
@felixfontein felixfontein merged commit f330a1c into master Jun 29, 2015
3 checks passed
3 checks passed
continuous-integration/appveyor AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@felixfontein felixfontein deleted the wordpress-import-auth-downloads branch Jun 29, 2015
@@ -131,6 +138,14 @@ def _execute(self, options={}, args=[]):
self.exclude_drafts = options.get('exclude_drafts', False)
self.no_downloads = options.get('no_downloads', False)

self.auth = None
if options.get('download_auth', None) is not None:

This comment has been minimized.

@Kwpolska

Kwpolska Jun 30, 2015
Member

You don’t need to explicitly specify , None, it’s the default.

self.auth = None
if options.get('download_auth', None) is not None:
username_password = options.get('download_auth')
self.auth = tuple(username_password.split(':', 1))

This comment has been minimized.

@Kwpolska

Kwpolska Jun 30, 2015
Member

tuple() is unnecessary here AFAIK.

This comment has been minimized.

@felixfontein

felixfontein Jun 30, 2015
Author Contributor

Both the requests documentation and source code explicitly mention tuple, but not list. So I'd prefer to stick to a tuple here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants