you should now start using main : it can finally pass args
This commit is contained in:
parent
3385540350
commit
eb2b9dc2d3
|
@ -11,3 +11,4 @@ data
|
||||||
/user_data
|
/user_data
|
||||||
install.sh
|
install.sh
|
||||||
nohup.out
|
nohup.out
|
||||||
|
test.py
|
||||||
|
|
7
main.py
7
main.py
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue