From 3500879256d4de49fd1f1f8ac3a52d041f215563 Mon Sep 17 00:00:00 2001 From: JJTech0130 Date: Sun, 27 Aug 2023 20:42:42 -0400 Subject: [PATCH] remove git --- demo.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/demo.py b/demo.py index de1e870..e8a8a54 100644 --- a/demo.py +++ b/demo.py @@ -5,7 +5,6 @@ import threading import time from base64 import b64decode, b64encode from getpass import getpass -from subprocess import PIPE, Popen from rich.logging import RichHandler @@ -34,11 +33,6 @@ logging.getLogger("imessage").setLevel(logging.INFO) logging.captureWarnings(True) -process = Popen(["git", "rev-parse", "HEAD"], stdout=PIPE) # type: ignore -(commit_hash, err) = process.communicate() -exit_code = process.wait() -commit_hash = commit_hash.decode().strip() - # Try and load config.json try: with open("config.json", "r") as f: @@ -46,15 +40,6 @@ try: except FileNotFoundError: CONFIG = {} -# Re-register if the commit hash has changed -FORCE_REREGISTER = True -if CONFIG.get("commit_hash") != commit_hash or FORCE_REREGISTER: - logging.warning("pypush commit is different, forcing re-registration...") - CONFIG["commit_hash"] = commit_hash - if "id" in CONFIG: - del CONFIG["id"] - - def safe_b64decode(s): try: return b64decode(s)