Skip to content

Commit

Permalink
Fix remaining path where is_layered could be a string.
Browse files Browse the repository at this point in the history
backports #8245
re #8374

(cherry picked from commit 84c5582)
  • Loading branch information
ggainey authored and goosemania committed Mar 11, 2021
1 parent c9dda61 commit b46d291
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pulp_rpm/app/kickstart/treeinfo.py
@@ -1,5 +1,4 @@
import json

from gettext import gettext as _
from configparser import MissingSectionHeaderError
from urllib.parse import urljoin
Expand Down Expand Up @@ -193,12 +192,18 @@ def distribution_tree(self):
)

if self._data.get("release"):
is_layered = self._data["release"].get("is_layered", False)

# If we get is_layered, but it's a string - let json turn it into a boolean
if is_layered and isinstance(is_layered, str):
is_layered = json.loads(is_layered)

distribution_tree.update(
{
"release_name": self._data["release"]["name"],
"release_short": self._data["release"]["short"],
"release_version": self._data["release"]["version"],
"release_is_layered": self._data["release"].get("is_layered", False),
"release_is_layered": is_layered,
}
)

Expand Down

0 comments on commit b46d291

Please sign in to comment.