Replace the generic exception class with a more specific one.

This commit is contained in:
Aditya Toshniwal
2020-08-07 12:37:00 +05:30
committed by Akshay Joshi
parent 68a5027d15
commit d6400bbcae
18 changed files with 46 additions and 34 deletions

View File

@@ -15,7 +15,8 @@ to start a web server."""
import sys
if sys.version_info < (3, 4):
raise Exception('This application must be run under Python 3.4 or later.')
raise RuntimeError('This application must be run under Python 3.4 '
'or later.')
import builtins
import os
@@ -163,7 +164,7 @@ def main():
"To run the app ensure that yarn install command runs "
"successfully"
)
raise Exception("No generated javascript, aborting")
raise RuntimeError("No generated javascript, aborting")
# Output a startup message if we're not under the runtime and startup.
# If we're under WSGI, we don't need to worry about this