Skip to content

Commit

Permalink
app: Don't print crash message on HookStop.
Browse files Browse the repository at this point in the history
  • Loading branch information
chfoo committed Sep 24, 2014
1 parent fb9a306 commit 53dae8f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions wpull/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from wpull.backport.logging import BraceMessage as __
from wpull.errors import ServerError, ExitStatus, ProtocolError, \
SSLVerficationError, DNSNotFound, ConnectionRefused, NetworkError
from wpull.hook import HookableMixin, HookDisconnected
from wpull.hook import HookableMixin, HookDisconnected, HookStop
import wpull.string


Expand Down Expand Up @@ -104,13 +104,8 @@ def run(self):
_logger.exception('Fatal exception.')
self._update_exit_code_from_error(error)

_logger.critical(_(
'Sorry, Wpull unexpectedly crashed. '
'Please report this problem to the authors at Wpull\'s '
'issue tracker so it may be fixed. '
'If you know how to program, maybe help us fix it? '
'Thank you for helping us help you help us all.'
))
if not isinstance(error, HookStop):
self._print_crash_message()

self._compute_exit_code_from_stats()

Expand Down Expand Up @@ -218,6 +213,15 @@ def _print_ssl_error(self):
_logger.info(_('To ignore and proceed insecurely, '
'use ‘--no-check-certificate’.'))

def _print_crash_message(self):
_logger.critical(_(
'Sorry, Wpull unexpectedly crashed. '
'Please report this problem to the authors at Wpull\'s '
'issue tracker so it may be fixed. '
'If you know how to program, maybe help us fix it? '
'Thank you for helping us help you help us all.'
))

def _convert_documents(self):
converter = self._builder.factory.instance_map.get(
'BatchDocumentConverter')
Expand Down

0 comments on commit 53dae8f

Please sign in to comment.