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

Fixing little things in WordPress importer (WIP) #1847

Merged
merged 4 commits into from Jun 30, 2015

Conversation

Projects
None yet
2 participants
@felixfontein
Copy link
Contributor

felixfontein commented Jun 27, 2015

When importing a WordPress blog whose blog description was not set, I got null inserted into conf.py instead of "PUT DESCRIPTION HERE", which caused nikola build to fail. This is fixed in 5781644.

Then, there are two more problems with the WordPress importer which make it fail for me; see comments here: b6cbfcb

@felixfontein felixfontein added the bug label Jun 27, 2015

@felixfontein felixfontein added this to the v7.6.0 milestone Jun 27, 2015

@felixfontein

This comment has been minimized.

Copy link
Contributor Author

felixfontein commented Jun 27, 2015

Parts will be fixed in #1824.

Missing at the moment: exception raised by tag.decode('utf8') under Python 3.

@felixfontein

This comment has been minimized.

Copy link
Contributor Author

felixfontein commented Jun 30, 2015

The currently failed checks are due to a disk full error on Travis, and a missing import markdown.

tag = utils.slugify(tag.decode('utf8'))
# In python 2, path is a str. slug requires a unicode
# object. According to wikipedia, unquoted strings will
# usually be UTF8

This comment has been minimized.

@Kwpolska

Kwpolska Jun 30, 2015

Member

Link to that wikipedia page in code comments.

This comment has been minimized.

@felixfontein

felixfontein Jun 30, 2015

Author Contributor

This piece is essentially a copy'n'paste from somewhere else in the same source file. The original comment has no link to Wikipedia, either.

# In python 2, path is a str. slug requires a unicode
# object. According to wikipedia, unquoted strings will
# usually be UTF8
tag_str = tag.decode('utf8') if isinstance(tag, utils.bytes_str) else tag

This comment has been minimized.

@Kwpolska

Kwpolska Jun 30, 2015

Member
try:
    tag_str = tag.decode('utf-8')
except AttributeError:
    tag_str = tag
@Kwpolska

This comment has been minimized.

Copy link
Member

Kwpolska commented Jun 30, 2015

Please make this mergeable and use try/except for decoding, and you can merge as soon as Travis builds.

@felixfontein

This comment has been minimized.

Copy link
Contributor Author

felixfontein commented Jun 30, 2015

Should I modify both occurences in this case? (The second is here: https://github.com/getnikola/nikola/blob/master/nikola/plugins/command/import_wordpress.py#L419)

@felixfontein felixfontein force-pushed the fix-wordpress-import branch from 063afb9 to c926116 Jun 30, 2015

@felixfontein

This comment has been minimized.

Copy link
Contributor Author

felixfontein commented Jun 30, 2015

Ok, modified both. Now merging.

felixfontein added a commit that referenced this pull request Jun 30, 2015

Merge pull request #1847 from getnikola/fix-wordpress-import
Fixing little things in WordPress importer (WIP)

@felixfontein felixfontein merged commit 685239d into master Jun 30, 2015

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 fix-wordpress-import branch Jun 30, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment