Merged adjustanct 'if' statements when allowed.

Also - removed the unused variables.
This commit is contained in:
Ashesh Vashi
2020-04-08 20:27:09 +05:30
parent 6c5883bce0
commit a930c6617b
2 changed files with 21 additions and 22 deletions

View File

@@ -117,13 +117,12 @@ else:
app.debug = False
# respond to JS
if config.DEBUG:
if javascriptBundler.report() == JsState.NONE:
app.logger.error("Unable to generate javascript")
app.logger.error(
"To run the app ensure that yarn install command runs successfully"
)
raise Exception("No generated javascript, aborting")
if config.DEBUG and javascriptBundler.report() == JsState.NONE:
app.logger.error(
"Unable to generate javascript.\n"
"To run the app ensure that yarn install command runs successfully"
)
raise Exception("No generated javascript, aborting")
# Start the web server. The port number should have already been set by the
# runtime if we're running in desktop mode, otherwise we'll just use the