Skip to content

Commit ff80600

Browse files
committed
moved config change out of a loop
1 parent 1c7ef68 commit ff80600

File tree

1 file changed

+3
-3
lines changed
  • confluence_markdown_exporter

1 file changed

+3
-3
lines changed

confluence_markdown_exporter/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def pages(
3737
from confluence_markdown_exporter.confluence import Page # noqa: PLC0415 lacy load
3838

3939
with measure(f"Export pages {', '.join(pages)}"):
40+
override_output_path_config(output_path)
4041
for page in pages:
41-
override_output_path_config(output_path)
4242
_page = Page.from_id(int(page)) if page.isdigit() else Page.from_url(page)
4343
_page.export()
4444

@@ -56,8 +56,8 @@ def pages_with_descendants(
5656
from confluence_markdown_exporter.confluence import Page # noqa: PLC0415 lacy load
5757

5858
with measure(f"Export pages {', '.join(pages)} with descendants"):
59+
override_output_path_config(output_path)
5960
for page in pages:
60-
override_output_path_config(output_path)
6161
_page = Page.from_id(int(page)) if page.isdigit() else Page.from_url(page)
6262
_page.export_with_descendants()
6363

@@ -75,8 +75,8 @@ def spaces(
7575
from confluence_markdown_exporter.confluence import Space # noqa: PLC0415 lacy load
7676

7777
with measure(f"Export spaces {', '.join(space_keys)}"):
78+
override_output_path_config(output_path)
7879
for space_key in space_keys:
79-
override_output_path_config(output_path)
8080
space = Space.from_key(space_key)
8181
space.export()
8282

0 commit comments

Comments
 (0)