From 7a0c4044e4e0772688f2ed6f1072e1bc8344ce9f Mon Sep 17 00:00:00 2001 From: Taka Date: Sat, 19 Mar 2022 14:08:52 +1100 Subject: [PATCH] Fixed an error caused by the VASL .vmod not loading properly. --- vasl_templates/webapp/vasl_mod.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vasl_templates/webapp/vasl_mod.py b/vasl_templates/webapp/vasl_mod.py index 7c98954..d8c7158 100644 --- a/vasl_templates/webapp/vasl_mod.py +++ b/vasl_templates/webapp/vasl_mod.py @@ -178,8 +178,9 @@ class VaslMod: # clean up # NOTE: We keep our module and extension ZIP files open for the duration (so we can # read images out of them on demand), so we need to make sure we close them here. - for f in self._files: - f[0].close() + if hasattr( self, "_files" ): + for f in self._files: + f[0].close() def get_piece_image( self, gpid, side, index ): """Get the image for the specified piece."""