mirror of
https://github.com/vladmandic/automatic
synced 2026-09-18 08:44:33 +02:00
Don't read log if load is forced.
This commit is contained in:
+7
-6
@@ -622,12 +622,13 @@ def parse_args():
|
||||
|
||||
def extensions_preload(force = False):
|
||||
setup_time = 0
|
||||
if os.path.isfile('setup.log'):
|
||||
with open('setup.log', 'r', encoding='utf8') as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
if 'Setup complete without errors' in line:
|
||||
setup_time = int(line.split(' ')[-1])
|
||||
if not force:
|
||||
if os.path.isfile('setup.log'):
|
||||
with open('setup.log', 'r', encoding='utf8') as f:
|
||||
lines = f.readlines()
|
||||
for line in lines:
|
||||
if 'Setup complete without errors' in line:
|
||||
setup_time = int(line.split(' ')[-1])
|
||||
if setup_time > 0 or force:
|
||||
log.info('Running extension preloading')
|
||||
if args.safe:
|
||||
|
||||
Reference in New Issue
Block a user