diff --git a/recipes/apple_daily.recipe b/recipes/apple_daily.recipe index c7603d2f89..ebf7c33330 100644 --- a/recipes/apple_daily.recipe +++ b/recipes/apple_daily.recipe @@ -10,7 +10,6 @@ import os import datetime import re from calibre.web.feeds.recipes import BasicNewsRecipe -from contextlib import nested from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.metadata.opf2 import OPFCreator from calibre.ebooks.metadata.toc import TOC @@ -302,5 +301,5 @@ class AppleDaily(BasicNewsRecipe): opf.create_spine(entries) opf.set_toc(toc) - with nested(open(opf_path, 'wb'), open(ncx_path, 'wb')) as (opf_file, ncx_file): + with open(opf_path, 'wb') as opf_file, open(ncx_path, 'wb') as ncx_file: opf.render(opf_file, ncx_file) diff --git a/recipes/ming_pao.recipe b/recipes/ming_pao.recipe index 3af15cdfeb..ecf8420200 100644 --- a/recipes/ming_pao.recipe +++ b/recipes/ming_pao.recipe @@ -78,7 +78,6 @@ import datetime import re import mechanize from calibre.web.feeds.recipes import BasicNewsRecipe -from contextlib import nested from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.metadata.opf2 import OPFCreator from calibre.ebooks.metadata.toc import TOC @@ -1177,5 +1176,5 @@ class MPRecipe(BasicNewsRecipe): opf.create_spine(entries) opf.set_toc(toc) - with nested(open(opf_path, 'wb'), open(ncx_path, 'wb')) as (opf_file, ncx_file): + with open(opf_path, 'wb') as opf_file, open(ncx_path, 'wb') as ncx_file: opf.render(opf_file, ncx_file) diff --git a/recipes/ming_pao_toronto.recipe b/recipes/ming_pao_toronto.recipe index 0138e2c6af..fe0a794010 100644 --- a/recipes/ming_pao_toronto.recipe +++ b/recipes/ming_pao_toronto.recipe @@ -70,7 +70,6 @@ import datetime import re import mechanize from calibre.web.feeds.recipes import BasicNewsRecipe -from contextlib import nested from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.metadata.opf2 import OPFCreator from calibre.ebooks.metadata.toc import TOC @@ -1015,5 +1014,5 @@ class MPRecipe(BasicNewsRecipe): opf.create_spine(entries) opf.set_toc(toc) - with nested(open(opf_path, 'wb'), open(ncx_path, 'wb')) as (opf_file, ncx_file): + with open(opf_path, 'wb') as opf_file, open(ncx_path, 'wb') as ncx_file: opf.render(opf_file, ncx_file) diff --git a/recipes/ming_pao_vancouver.recipe b/recipes/ming_pao_vancouver.recipe index 11ab387c65..8060b37024 100644 --- a/recipes/ming_pao_vancouver.recipe +++ b/recipes/ming_pao_vancouver.recipe @@ -70,7 +70,6 @@ import datetime import re import mechanize from calibre.web.feeds.recipes import BasicNewsRecipe -from contextlib import nested from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.metadata.opf2 import OPFCreator from calibre.ebooks.metadata.toc import TOC @@ -1015,5 +1014,5 @@ class MPRecipe(BasicNewsRecipe): opf.create_spine(entries) opf.set_toc(toc) - with nested(open(opf_path, 'wb'), open(ncx_path, 'wb')) as (opf_file, ncx_file): + with open(opf_path, 'wb') as opf_file, open(ncx_path, 'wb') as ncx_file: opf.render(opf_file, ncx_file) diff --git a/recipes/singtaohk.recipe b/recipes/singtaohk.recipe index 6a643b84e2..aecfb06258 100644 --- a/recipes/singtaohk.recipe +++ b/recipes/singtaohk.recipe @@ -31,7 +31,6 @@ import os import datetime import re from calibre.web.feeds.recipes import BasicNewsRecipe -from contextlib import nested from calibre.ebooks.BeautifulSoup import BeautifulSoup from calibre.ebooks.metadata.opf2 import OPFCreator from calibre.ebooks.metadata.toc import TOC @@ -527,5 +526,5 @@ class STHKRecipe(BasicNewsRecipe): opf.create_spine(entries) opf.set_toc(toc) - with nested(open(opf_path, 'wb'), open(ncx_path, 'wb')) as (opf_file, ncx_file): + with open(opf_path, 'wb') as opf_file, open(ncx_path, 'wb') as ncx_file: opf.render(opf_file, ncx_file)