Skip to content

Commit bc2ff6e

Browse files
committed
moved config change out of a loop
1 parent d789b43 commit bc2ff6e

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
@@ -33,8 +33,8 @@ def pages(
3333
from confluence_markdown_exporter.confluence import Page
3434

3535
with measure(f"Export pages {', '.join(pages)}"):
36+
override_output_path_config(output_path)
3637
for page in pages:
37-
override_output_path_config(output_path)
3838
_page = Page.from_id(int(page)) if page.isdigit() else Page.from_url(page)
3939
_page.export()
4040

@@ -52,8 +52,8 @@ def pages_with_descendants(
5252
from confluence_markdown_exporter.confluence import Page
5353

5454
with measure(f"Export pages {', '.join(pages)} with descendants"):
55+
override_output_path_config(output_path)
5556
for page in pages:
56-
override_output_path_config(output_path)
5757
_page = Page.from_id(int(page)) if page.isdigit() else Page.from_url(page)
5858
_page.export_with_descendants()
5959

@@ -71,8 +71,8 @@ def spaces(
7171
from confluence_markdown_exporter.confluence import Space
7272

7373
with measure(f"Export spaces {', '.join(space_keys)}"):
74+
override_output_path_config(output_path)
7475
for space_key in space_keys:
75-
override_output_path_config(output_path)
7676
space = Space.from_key(space_key)
7777
space.export()
7878

0 commit comments

Comments
 (0)