Skip to content
Permalink
Browse files

flake8

  • Loading branch information
ralsina committed Aug 23, 2015
1 parent be99f85 commit be4b1181057e816de6151de514751a49fa9e7114
Showing with 5 additions and 4 deletions.
  1. +5 −4 v7/import_page/import_page.py
@@ -46,6 +46,7 @@
{content}
'''


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

@@ -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:

0 comments on commit be4b118

Please sign in to comment.
You can’t perform that action at this time.