From c3643552977989be8dce1537e29fbd2f94bfd0ab Mon Sep 17 00:00:00 2001 From: SBM Date: Sun, 21 May 2023 16:37:38 +0300 Subject: [PATCH] Don't read log if load is forced. --- installer.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/installer.py b/installer.py index 316a69d9b..0ecf09308 100644 --- a/installer.py +++ b/installer.py @@ -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: