Added silent mode to init_global_vars()
This commit is contained in:
parent
ad9662c120
commit
e1834d5179
1 changed files with 11 additions and 6 deletions
|
|
@ -652,9 +652,10 @@ def wait_for_process(name, poll_rate=3):
|
||||||
sleep(1)
|
sleep(1)
|
||||||
|
|
||||||
# global_vars functions
|
# global_vars functions
|
||||||
def init_global_vars():
|
def init_global_vars(silent=False):
|
||||||
"""Sets global variables based on system info."""
|
"""Sets global variables based on system info."""
|
||||||
print_info('Initializing')
|
if not silent:
|
||||||
|
print_info('Initializing')
|
||||||
if psutil.WINDOWS:
|
if psutil.WINDOWS:
|
||||||
os.system('title Wizard Kit')
|
os.system('title Wizard Kit')
|
||||||
if psutil.LINUX:
|
if psutil.LINUX:
|
||||||
|
|
@ -672,10 +673,14 @@ def init_global_vars():
|
||||||
['Clearing collisions...', clean_env_vars],
|
['Clearing collisions...', clean_env_vars],
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
for f in init_functions:
|
if silent:
|
||||||
try_and_print(
|
for f in init_functions:
|
||||||
message=f[0], function=f[1],
|
f[1]()
|
||||||
cs='Done', ns='Error', catch_all=False)
|
else:
|
||||||
|
for f in init_functions:
|
||||||
|
try_and_print(
|
||||||
|
message=f[0], function=f[1],
|
||||||
|
cs='Done', ns='Error', catch_all=False)
|
||||||
except:
|
except:
|
||||||
major_exception()
|
major_exception()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue