Added some comments.

master
Pacman Ghost 2 years ago
parent 6f1dbae5c8
commit d8c9d20e2c
  1. 6
      vasl_templates/webapp/vassal.py
  2. 3
      vasl_templates/webapp/webdriver.py

@ -391,6 +391,12 @@ class VassalShim:
def _run_vassal_shim( self, *args ): #pylint: disable=too-many-locals
"""Run the VASSAL shim."""
# NOTE: If VASSAL is taking a really long time to run (when it's loading the VASL module),
# check if any NIC's are enabled, but there isn't actually any internet access. I suspect
# that VASL is checking for something online, and taking a really long time to time-out.
# If there are no NIC's, then the attempt to connect fails immediately, but there are,
# the networking stack tries to find a route online.
# initialize
logger = logging.getLogger( "vassal_shim" )

@ -118,6 +118,9 @@ class WebDriver:
def get_screenshot( self, html, window_size, large_window_size=None ):
"""Get a preview screenshot of the specified HTML."""
# NOTE: If this is taking a really long time to run, check if there are images
# being downloaded from the internet, but no internet access... :-/
def do_get_screenshot(): #pylint: disable=missing-docstring
data = self.driver.get_screenshot_as_png()
img = Image.open( io.BytesIO( data ) )

Loading…
Cancel
Save