Skip to content

Commit

Permalink
Dispatch event: Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 19, 2024
1 parent 1b1f8a8 commit 43f0798
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions github_app_geo_project/module/dispatch_publishing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class _Destination(BaseModel):
"""The event type to dispatch"""
legacy: bool = False
"""Transform the content to the legacy format"""
version_type: str
version_type: str | None = None
"""The version type to dispatch"""
package_type: str
package_type: str | None = None
"""The package type to dispatch"""
image_re: str = ".*"
"""The image regular expression to dispatch"""
Expand All @@ -37,7 +37,11 @@ class _Config(BaseModel):
"""The destinations to dispatch to"""


CONFIG = _Config(**json.loads(os.environ.get("DISPATCH_PUBLISH_CONFIG", "{}")))
try:
CONFIG = _Config(**json.loads(os.environ.get("DISPATCH_PUBLISH_CONFIG", "{}")))
except Exception: # pylint: disable=broad-exception-caught
_LOGGER.exception("Error loading the configuration")
CONFIG = _Config()


class DispatchPublishing(module.Module[None, None, None]):
Expand Down

0 comments on commit 43f0798

Please sign in to comment.