🛠️ Fixed check if app is running from source code.

This commit is contained in:
Robert Honz
2024-04-05 09:22:08 +02:00
parent 22bd6221f7
commit 301a4c5ba4
+3 -3
View File
@@ -97,14 +97,14 @@ def is_dev_env() -> bool:
package_name: str = name_package()
result: bool = False
# Check if package is running from source code == dev mode
# Check if package is running from source code == dev mode
# If package is not running in PyInstaller environment.
if getattr(sys, "frozen", True) and not hasattr(sys, "_MEIPASS"):
if not getattr(sys, "frozen", False) and not hasattr(sys, "_MEIPASS"):
try:
importlib.metadata.version(package_name)
except:
# If package is not installed
result = False
result = True
return result