Skip to content

Commit be95a96

Browse files
committed
moved config change out of a loop
1 parent 43237f9 commit be95a96

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
@@ -35,8 +35,8 @@ def pages(
3535
from confluence_markdown_exporter.confluence import Page
3636

3737
with measure(f"Export pages {', '.join(pages)}"):
38+
override_output_path_config(output_path)
3839
for page in pages:
39-
override_output_path_config(output_path)
4040
_page = Page.from_id(int(page)) if page.isdigit() else Page.from_url(page)
4141
_page.export()
4242

@@ -54,8 +54,8 @@ def pages_with_descendants(
5454
from confluence_markdown_exporter.confluence import Page
5555

5656
with measure(f"Export pages {', '.join(pages)} with descendants"):
57+
override_output_path_config(output_path)
5758
for page in pages:
58-
override_output_path_config(output_path)
5959
_page = Page.from_id(int(page)) if page.isdigit() else Page.from_url(page)
6060
_page.export_with_descendants()
6161

@@ -73,8 +73,8 @@ def spaces(
7373
from confluence_markdown_exporter.confluence import Space
7474

7575
with measure(f"Export spaces {', '.join(space_keys)}"):
76+
override_output_path_config(output_path)
7677
for space_key in space_keys:
77-
override_output_path_config(output_path)
7878
space = Space.from_key(space_key)
7979
space.export()
8080

0 commit comments

Comments
 (0)