mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 21:11:59 +02:00
Reduce logging level of normal system exceptions.
This commit is contained in:
parent
d38360be6b
commit
7f0c989319
1 changed files with 5 additions and 2 deletions
7
main.py
7
main.py
|
|
@ -306,10 +306,9 @@ class FanfictionDownloader(UserConfigServer):
|
|||
logging.info("enqueued download key: " + str(download.key()))
|
||||
|
||||
except (exceptions.FailedToLogin,exceptions.AdultCheckRequired), e:
|
||||
logging.exception(e)
|
||||
download.failure = str(e)
|
||||
download.put()
|
||||
logging.debug('Need to Login, display log in page')
|
||||
logging.info(str(e))
|
||||
is_login= ( isinstance(e, exceptions.FailedToLogin) )
|
||||
template_values = dict(nickname = user.nickname(),
|
||||
url = url,
|
||||
|
|
@ -326,6 +325,10 @@ class FanfictionDownloader(UserConfigServer):
|
|||
path = os.path.join(os.path.dirname(__file__), 'login.html')
|
||||
self.response.out.write(template.render(path, template_values))
|
||||
return
|
||||
except (exceptions.InvalidStoryURL,exceptions.UnknownSite), e:
|
||||
logging.warn(str(e))
|
||||
download.failure = str(e)
|
||||
download.put()
|
||||
except Exception, e:
|
||||
logging.exception(e)
|
||||
download.failure = str(e)
|
||||
|
|
|
|||
Loading…
Reference in a new issue