Skip to content

Commit

Permalink
fix parsing keycloak config and error printing
Browse files Browse the repository at this point in the history
  • Loading branch information
kerberizer committed Jul 8, 2024
1 parent 5e5b864 commit b61897b
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions h5pyd/_apps/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,21 @@
"help": "storage Bucket to use (S3 Bucket, Azure Container, or top-level directory)",
"choices": ["BUCKET",]
},

"hs_keycloak_client_id": {
"default": None,
"flags": ["--keycloak-client-id",],
"help": "Keycloak Client ID",
},
"hs_keycloak_realm": {
"default": None,
"flags": ["--keycloak-realm",],
"help": "Keycloak Realm",
},
"hs_keycloak_uri": {
"default": None,
"flags": ["--keycloak-uri",],
"help": "Keycloak instance base URL",
},
"loglevel": {
"default": "error",
"flags": ["--loglevel",],
Expand Down Expand Up @@ -128,7 +142,7 @@ def __init__(self, config_file=None, custom_entries=[], **kwargs):
k = fields[0].strip()
v = fields[1].strip()
if k not in self._names:
raise ValueError(f"undefined option: {name}")
raise ValueError(f"undefined option: {k}")
if k in self._choices:
choices = self._choices[k]
if len(choices) > 1 and v not in self._choices:
Expand Down

0 comments on commit b61897b

Please sign in to comment.