Skip to content

Commit 5e2ef39

Browse files
committed
fix: reading config required a list of file paths
1 parent e6204e3 commit 5e2ef39

File tree

1 file changed

+3
-3
lines changed
  • src/wordpress_markdown_blog_loader

1 file changed

+3
-3
lines changed

src/wordpress_markdown_blog_loader/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
def get_default_host() -> Optional[str]:
2121
"""
22-
returns the default api host from ~/.wordpress.ini
22+
returns the default api host from .wordpress.ini and/or ~/.wordpress.ini
2323
"""
2424
config = configparser.ConfigParser()
25-
config.read(expanduser("~/.wordpress.ini"))
25+
config.read([".wordpress.ini", expanduser("~/.wordpress.ini")])
2626
return config.defaults().get("host")
2727

2828

@@ -64,7 +64,7 @@ def __init__(self, **kwargs):
6464

6565
def read_from_config(self, host: str):
6666
config = configparser.ConfigParser()
67-
config.read(expanduser("~/.wordpress.ini"))
67+
config.read([".wordpress.ini", expanduser("~/.wordpress.ini")])
6868

6969
if not host:
7070
host = config.defaults().get("host")

0 commit comments

Comments
 (0)