Show a better error message if Java is not configured.

master
Pacman Ghost 7 months ago
parent cb0369b85a
commit 5606fe0d1a
  1. 6
      vasl_templates/webapp/main.py
  2. 2
      vasl_templates/webapp/vassal.py

@ -235,9 +235,13 @@ def get_program_info():
return tstamp + timedelta( minutes=tz_offset ) return tstamp + timedelta( minutes=tz_offset )
# set the basic details # set the basic details
try:
vassal_version = VassalShim.get_version()
except Exception: #pylint: disable=broad-except
vassal_version = "???"
params = { params = {
"APP_VERSION": vasl_templates.webapp.config.constants.APP_VERSION, "APP_VERSION": vasl_templates.webapp.config.constants.APP_VERSION,
"VASSAL_VERSION": VassalShim.get_version() "VASSAL_VERSION": vassal_version
} }
build_git_info = get_build_git_info() build_git_info = get_build_git_info()
if build_git_info: if build_git_info:

@ -435,6 +435,8 @@ class VassalShim:
if compare_version_strings( mo.group(), "3.3.0" ) < 0: if compare_version_strings( mo.group(), "3.3.0" ) < 0:
# we're using a legacy version of VASSAL - use Java 8 # we're using a legacy version of VASSAL - use Java 8
java_path = java8_path java_path = java8_path
if not java_path:
raise SimpleError( "Java has not been configured." )
# prepare the command # prepare the command
class_path = app.config.get( "JAVA_CLASS_PATH" ) class_path = app.config.get( "JAVA_CLASS_PATH" )

Loading…
Cancel
Save