Change package_url_json to a constant

This commit is contained in:
KnugiHK
2025-03-02 00:29:03 +08:00
parent 86cb44ced9
commit 431dce7d24

View File

@@ -145,9 +145,9 @@ def check_update():
import importlib
from sys import platform
package_url_json = "https://pypi.org/pypi/whatsapp-chat-exporter/json"
PACKAGE_JSON = "https://pypi.org/pypi/whatsapp-chat-exporter/json"
try:
raw = urllib.request.urlopen(package_url_json)
raw = urllib.request.urlopen(PACKAGE_JSON)
except Exception:
print("Failed to check for updates.")
return 1