Fix Newsweek recipe and Implement #2975 (Validation for i/o filenames in ebook-convert)

This commit is contained in:
Kovid Goyal 2009-07-28 14:33:44 -06:00
parent 3f9af83513
commit 2c25153079
2 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,8 @@ class Plumber(object):
''' '''
self.input = os.path.abspath(input) self.input = os.path.abspath(input)
self.output = os.path.abspath(output) self.output = os.path.abspath(output)
if self.input == self.output:
raise ValueError('Input file is the same as the output file')
self.log = log self.log = log
self.ui_reporter = report_progress self.ui_reporter = report_progress

View File

@ -30,6 +30,7 @@ class Newsweek(BasicNewsRecipe):
remove_tags = [ remove_tags = [
{'class':['fwArticle noHr','fwArticle','subinfo','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content', {'class':['fwArticle noHr','fwArticle','subinfo','hdlBulletItem','head-content','navbar','link', 'ad', 'sponsorLinksArticle', 'mm-content',
'inline-social-links-wrapper', 'email-article', 'inline-social-links-wrapper', 'email-article',
'inlineComponentRight',
'comments-and-social-links-wrapper', 'EmailArticleBlock']}, 'comments-and-social-links-wrapper', 'EmailArticleBlock']},
{'id' : ['footer', 'ticker-data', 'topTenVertical', {'id' : ['footer', 'ticker-data', 'topTenVertical',
'digg-top-five', 'mesothorax', 'nw-comments', 'digg-top-five', 'mesothorax', 'nw-comments',