Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Oct 31, 2023
1 parent 65b204d commit 16abc4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion varfish_cli/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

try:
import tomllib
from tomllib import TOMLDecodeError
except ImportError:
import toml as tomllib
from tomllib import TomlDecodeError as TOMLDecodeError

import typing

Expand Down Expand Up @@ -46,7 +48,7 @@ def load_config(config_path: str) -> typing.Tuple[typing.Optional[str], typing.O
with open(config_path, "rb") as tomlf:
try:
config_toml = tomllib.load(tomlf)
except tomllib.TOMLDecodeError as e:
except TOMLDecodeError as e:
logger.error("could not parse configuration file %s: %s", config_path, e)
raise typer.Exit(1)
toml_varfish_server_url = config_toml.get("global", {}).get("varfish_server_url")
Expand Down

0 comments on commit 16abc4d

Please sign in to comment.