Skip to content

Commit

Permalink
Fixed some more typos and tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Jul 7, 2015
1 parent 0cae3cc commit 8892d08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nikola/plugins/command/import_wordpress.py
Expand Up @@ -167,7 +167,7 @@ def _read_options(self, options, args):
self.import_empty_items = options.get('include_empty_items', False)

self.export_categories_as_categories = options.get('export_categories_as_categories', False)
self.read_comments = options.get('read_comments', False)
self.export_comments = options.get('export_comments', False)

self.auth = None
if options.get('download_auth') is not None:
Expand Down Expand Up @@ -710,7 +710,7 @@ def import_item(self, item, wordpress_namespace, out_folder=None):
out_folder, out_content_filename),
content)

if self.read_comments:
if self.export_comments:
comments = []
for tag in item.findall('{{{0}}}comment'.format(wordpress_namespace)):
comment = self._extract_comment(tag, wordpress_namespace)
Expand Down
2 changes: 2 additions & 0 deletions tests/test_command_import_wordpress.py
Expand Up @@ -194,6 +194,8 @@ def test_importing_posts_and_attachments(self):
self.import_command.output_folder = 'new_site'
self.import_command.squash_newlines = True
self.import_command.no_downloads = False
self.import_command.export_categories_as_categories = False
self.import_command.export_comments = False

# Ensuring clean results
self.import_command.url_map = {}
Expand Down

0 comments on commit 8892d08

Please sign in to comment.