From 431dce7d24e61800284d83587d54b152dff718e4 Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Sun, 2 Mar 2025 00:29:03 +0800 Subject: [PATCH] Change package_url_json to a constant --- Whatsapp_Chat_Exporter/utility.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Whatsapp_Chat_Exporter/utility.py b/Whatsapp_Chat_Exporter/utility.py index 172b748..2db7445 100644 --- a/Whatsapp_Chat_Exporter/utility.py +++ b/Whatsapp_Chat_Exporter/utility.py @@ -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