Skip to content

Commit a630f1b

Browse files
9.0.0
1 parent 0e5b26f commit a630f1b

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

interface/input_interface.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,34 +1443,39 @@ def main_tab_changed(index):
14431443
cfg.dialog.ui.help_textBrowser.clear()
14441444
cfg.dialog.ui.help_textBrowser.setPlainText('Loading ...')
14451445
# for user manual
1446-
cfg.rs.files_directories.create_directory('%s/_images/' % cfg.temp_dir)
1446+
cfg.rs.files_directories.create_directory(
1447+
'%s/_images/' % cfg.rs.configurations.temp.dir)
14471448
base_url = (
14481449
'https://semiautomaticclassificationmanual.readthedocs.io/en/'
14491450
'latest/%s.html' % cfg.current_tab
14501451
)
14511452
cfg.logger.log.debug('help tab: %s' % base_url)
14521453
QApplication.instance().processEvents()
14531454
if not cfg.utils.check_file(
1454-
'%s/%s.html' % (cfg.temp_dir, cfg.current_tab)
1455+
'%s/%s.html' %
1456+
(cfg.rs.configurations.temp.dir, cfg.current_tab)
14551457
):
14561458
response = get(base_url)
14571459
with open(
14581460
'%s/%s.html'
1459-
% (cfg.temp_dir, cfg.current_tab), 'wb'
1461+
% (cfg.rs.configurations.temp.dir, cfg.current_tab), 'wb'
14601462
) as file:
14611463
file.write(response.content)
1462-
with open('%s/%s.html' % (cfg.temp_dir, cfg.current_tab), 'r') as h:
1464+
with open('%s/%s.html'
1465+
% (cfg.rs.configurations.temp.dir, cfg.current_tab), 'r') as h:
14631466
html = h.read()
14641467
images = findall('src="_images/(.+?)"', str(html))
14651468
for image in images:
1466-
if not cfg.utils.check_file(cfg.temp_dir + '/_images/' + image):
1469+
if not cfg.utils.check_file(
1470+
cfg.rs.configurations.temp.dir + '/_images/' + image):
14671471
try:
14681472
response = get(
14691473
'https://semiautomaticclassificationmanual.'
14701474
'readthedocs.io/en/latest/_images/%s' % image
14711475
)
14721476
with open(
1473-
'%s/_images/%s' % (cfg.temp_dir, image), 'wb'
1477+
'%s/_images/%s'
1478+
% (cfg.rs.configurations.temp.dir, image), 'wb'
14741479
) as file:
14751480
file.write(response.content)
14761481
except Exception as err:
-50 Bytes
Loading

0 commit comments

Comments
 (0)