From eb2b9dc2d339db48618d661d47ca96770ded0e89 Mon Sep 17 00:00:00 2001 From: piair Date: Tue, 4 Apr 2023 20:59:45 +0200 Subject: [PATCH] you should now start using main : it can finally pass args --- .gitignore | 1 + main.py | 7 ++++--- version | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 8b1acd4..4f41e8a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ data /user_data install.sh nohup.out +test.py diff --git a/main.py b/main.py index 6e8658c..9b61efb 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ import configparser import os import shutil import requests - +import sys config = configparser.ConfigParser() @@ -165,7 +165,7 @@ def check_update(): txt = f.readlines()[0].replace("\n","") f.close() cur = parse_version(txt) - if (cur < latest) : + if not (cur < latest) : print("Already up to date.") else : print(f"updating to {latest}") @@ -177,5 +177,6 @@ LogPath = config["PATH"]["logpath"] if LogPath == "/your/path/to/loginandpass.csv" : setup() else : + args = " ".join(sys.argv[1::]) check_update() - os.system("python3 V5.py") + os.system("python3 V5.py " + args) diff --git a/version b/version index 96f3123..ee80415 100644 --- a/version +++ b/version @@ -1 +1 @@ -v5.1.2 +v5.2.0