Skip to content

Commit

Permalink
🐛 add except configparser.NoSectionError to ci user lookup
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Jul 8, 2024
1 parent 17acd16 commit 4c819fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ozi/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"""
from __future__ import annotations

import configparser
from pathlib import Path
from typing import TYPE_CHECKING
from typing import AnyStr
Expand Down Expand Up @@ -182,7 +183,7 @@ def render_ci_files_set_user(env: Environment, target: Path, ci_provider: str) -
repo = Repo.init(target, mkdir=False)
try:
ci_user = repo.config_reader().get('user', 'name')
except InvalidGitRepositoryError: # pragma: no cover
except (InvalidGitRepositoryError, configparser.NoSectionError): # pragma: no cover
ci_user = ''

match ci_provider:
Expand Down

0 comments on commit 4c819fb

Please sign in to comment.