mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
remove git
This commit is contained in:
parent
769332f5fa
commit
3500879256
1 changed files with 0 additions and 15 deletions
15
demo.py
15
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)
|
||||
|
|
Loading…
Reference in a new issue