##// END OF EJS Templates
resourceutil: force filesystem access to resources when using py2exe...
Matt Harbison -
r49965:4ba27acd default
parent child Browse files
Show More
@@ -61,6 +61,10 b' try:'
61 # Force loading of the resources module
61 # Force loading of the resources module
62 resources.open_binary # pytype: disable=module-attr
62 resources.open_binary # pytype: disable=module-attr
63
63
64 # py2exe raises an AssertionError if uses importlib.resources
65 if getattr(sys, "frozen", None) in ("console_exe", "windows_exe"):
66 raise ImportError
67
64 except (ImportError, AttributeError):
68 except (ImportError, AttributeError):
65 # importlib.resources was not found (almost definitely because we're on a
69 # importlib.resources was not found (almost definitely because we're on a
66 # Python version before 3.7)
70 # Python version before 3.7)
General Comments 0
You need to be logged in to leave comments. Login now