Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Aug 23, 2015
1 parent be99f85 commit be4b118
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions v7/import_page/import_page.py
Expand Up @@ -46,6 +46,7 @@
{content}
'''


class CommandImportPage(Command):
"""Import a Page or Octopress blog."""

Expand All @@ -71,11 +72,11 @@ def _import_page(self, url):
lengths = [len(n.text_content()) for n in nodes]
node = nodes[lengths.index(max(lengths))]
document = doc_template.format(
title = title,
slug = slug,
content = lxml.html.tostring(node, encoding='utf8', method='html', pretty_print=True).decode('utf8')
title=title,
slug=slug,
content=lxml.html.tostring(node, encoding='utf8', method='html', pretty_print=True).decode('utf8')
)
with codecs.open(slug + '.html', 'w+', encoding='utf-8' ) as outf:
with codecs.open(slug + '.html', 'w+', encoding='utf-8') as outf:
outf.write(document)

else:
Expand Down

0 comments on commit be4b118

Please sign in to comment.