#3092 [hub] getBuildType: ensure id exists in buildinfo dict
Merged 2 years ago by julian8628. Opened 2 years ago by julian8628.
julian8628/koji issue/3091  into  master

file modified
+2 -2
@@ -4248,7 +4248,7 @@ 

      """Return information about a build.

  

      buildInfo may be either a int ID, a string NVR, or a map containing

-     'name', 'version' and 'release.

+     'name', 'version' and 'release'.

  

      A map will be returned containing the following keys*:

        id: build ID
@@ -4695,7 +4695,7 @@ 

      Returns a dictionary whose keys are type names and whose values are

      the type info corresponding to that type

      """

-     if not isinstance(buildInfo, dict) or 'extra' not in buildInfo:

+     if not isinstance(buildInfo, dict) or 'extra' not in buildInfo or 'id' not in buildInfo:

          binfo = get_build(buildInfo, strict=strict)

          if not binfo:

              return None

if there is no id, call get_build to fetch the build data (n-v-r inside will be used or the data is invalid)

fixes: #3091

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

2 years ago

Metadata Update from @jcupova:
- Pull-request tagged with: testing-done

2 years ago

pretty please pagure-ci rebuild

2 years ago

Commit 82e5fbd fixes this pull-request

Pull-Request has been merged by julian8628

2 years ago
Metadata