Skip to content

Commit

Permalink
results: Parse git configuration with configparser with strict=False
Browse files Browse the repository at this point in the history
configparser usually complain about multiple entries for the same
option.
Using strict=False allow duplicate entries, like in the case of multiple
"fetch=" entries on the same section.

Signed-off-by: Arisu Tachibana <arisu.tachibana@miraclelinux.com>
  • Loading branch information
aliceinwire committed Jan 20, 2025
1 parent 6834781 commit 3977be4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kcidev/subcommands/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def get_folder_repository(git_folder):
if os.path.exists(dot_git_folder):
# Get remote origin url
git_config_path = os.path.join(dot_git_folder, "config")
git_config = configparser.ConfigParser()
git_config = configparser.ConfigParser(strict=False)
git_config.read(git_config_path)
git_url = git_config.get('remote "origin"', "url")
# A way of standardize git url for API call
Expand Down

0 comments on commit 3977be4

Please sign in to comment.