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,8 +652,9 @@ 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."""
|
||||||
|
if not silent:
|
||||||
print_info('Initializing')
|
print_info('Initializing')
|
||||||
if psutil.WINDOWS:
|
if psutil.WINDOWS:
|
||||||
os.system('title Wizard Kit')
|
os.system('title Wizard Kit')
|
||||||
|
|
@ -672,6 +673,10 @@ def init_global_vars():
|
||||||
['Clearing collisions...', clean_env_vars],
|
['Clearing collisions...', clean_env_vars],
|
||||||
]
|
]
|
||||||
try:
|
try:
|
||||||
|
if silent:
|
||||||
|
for f in init_functions:
|
||||||
|
f[1]()
|
||||||
|
else:
|
||||||
for f in init_functions:
|
for f in init_functions:
|
||||||
try_and_print(
|
try_and_print(
|
||||||
message=f[0], function=f[1],
|
message=f[0], function=f[1],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue