you should now start using main : it can finally pass args

This commit is contained in:
piair 2023-04-04 20:59:45 +02:00
parent 3385540350
commit eb2b9dc2d3
3 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View File

@ -11,3 +11,4 @@ data
/user_data /user_data
install.sh install.sh
nohup.out nohup.out
test.py

View File

@ -4,7 +4,7 @@ import configparser
import os import os
import shutil import shutil
import requests import requests
import sys
config = configparser.ConfigParser() config = configparser.ConfigParser()
@ -165,7 +165,7 @@ def check_update():
txt = f.readlines()[0].replace("\n","") txt = f.readlines()[0].replace("\n","")
f.close() f.close()
cur = parse_version(txt) cur = parse_version(txt)
if (cur < latest) : if not (cur < latest) :
print("Already up to date.") print("Already up to date.")
else : else :
print(f"updating to {latest}") print(f"updating to {latest}")
@ -177,5 +177,6 @@ LogPath = config["PATH"]["logpath"]
if LogPath == "/your/path/to/loginandpass.csv" : if LogPath == "/your/path/to/loginandpass.csv" :
setup() setup()
else : else :
args = " ".join(sys.argv[1::])
check_update() check_update()
os.system("python3 V5.py") os.system("python3 V5.py " + args)

View File

@ -1 +1 @@
v5.1.2 v5.2.0