Skip to content

packaging-check-invariants: Avoid crashing on OBS-only packages

Emanuele Aina requested to merge wip/em/avoid-crashing-on-obs-only-packages into master

If a package only appears on OBS the dashboard fails with an exception:

Traceback (most recent call last):
  File "/builds/-RogsxNE/0/infrastructure/dashboard/./bin/packaging-check-invariants", line 854, in <module>
    checker.check_git_and_obs_versions(package)
  File "/builds/-RogsxNE/0/infrastructure/dashboard/./bin/packaging-check-invariants", line 238, in check_git_and_obs_versions
    if package.git.default_branch:
       ^^^^^^^^^^^
  File "/builds/-RogsxNE/0/infrastructure/dashboard/./bin/packaging-check-invariants", line 79, in __getattr__
    item = super(DictWrapper, self).__getitem__(attr)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'git'

Merge request reports