diff options
author | cedricbonhomme <devnull@localhost> | 2012-11-08 23:08:35 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-11-08 23:08:35 +0100 |
commit | 901fbd154f16268ca4c9d10af8d038d684c8c4f4 (patch) | |
tree | e131333ad325c6b595345bb16113f1263a57d9dc /source/export.py | |
parent | HTML username text input is now focused by default. (diff) | |
download | newspipe-901fbd154f16268ca4c9d10af8d038d684c8c4f4.tar.gz newspipe-901fbd154f16268ca4c9d10af8d038d684c8c4f4.tar.bz2 newspipe-901fbd154f16268ca4c9d10af8d038d684c8c4f4.zip |
Porting to Python 3.2. Better, faster, stronger.
Diffstat (limited to 'source/export.py')
-rw-r--r-- | source/export.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/export.py b/source/export.py index 8380682a..f2fbd729 100644 --- a/source/export.py +++ b/source/export.py @@ -160,8 +160,8 @@ def export_pdf(feeds): Export the articles given in parameter in PDF files. """ from xhtml2pdf import pisa - import cStringIO as StringIO - for feed in feeds.values(): + import io as StringIO + for feed in list(feeds.values()): # creates folder for each stream folder = utils.path + "/var/export/pdf/" + \ utils.normalize_filename(feed.feed_title.strip().replace(':', '').lower()) @@ -171,7 +171,7 @@ def export_pdf(feeds): # directories already exists (not a problem) pass - for article in feed.articles.values(): + for article in list(feed.articles.values()): name = article.article_date.strip().replace(' ', '_') name = os.path.normpath(folder + "/" + name + ".pdf") |