Skip to content

Commit d64f2d2

Browse files
committed
catch more exceptions
1 parent 51e89df commit d64f2d2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

goose/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,10 @@ def crawl(self, crawl_candiate):
6868
article = crawler.crawl(crawl_candiate)
6969
except (UnicodeDecodeError, ValueError):
7070
self.config.parser_class = parsers[0]
71-
try:
72-
if isinstance(crawl_candiate, basestring):
73-
return self.crawl(crawl_candiate)
74-
except exception as e:
75-
print >> sys.stderr, 'Article Crawl error: ', traceback.format_exec()
71+
if isinstance(crawl_candiate, basestring):
72+
return self.crawl(crawl_candiate)
73+
except exception as e:
74+
print >> sys.stderr, 'Article Crawl error: ', traceback.format_exec()
7675
return article
7776

7877
def initialize(self):

0 commit comments

Comments
 (0)