Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Commit 1ac59ed

Browse files
authored
Merge pull request #23 from upgrades-migrations/new_treeinfo_format_support_rhel_6
Treeinfo file renamed product section (RHEL 6)
2 parents cd23544 + 1f0bb01 commit 1ac59ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: redhat-upgrade-tool.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,10 @@ def handle_sigwinch(signum, frame):
252252
elif not f.instrepo.gpgcheck:
253253
# If instrepo is a Red Hat repo, add the gpg key and reload the repos
254254
try:
255-
if f.treeinfo.get('product', 'name') == 'Red Hat Enterprise Linux':
255+
key = "product"
256+
if not f.treeinfo.has_section(key):
257+
key = "release"
258+
if f.treeinfo.get(key, 'name') == 'Red Hat Enterprise Linux':
256259
log.info("Reloading repos with GPG key")
257260
args.repos.append(('gpgkey', '%s=%s' % (f.instrepo.name, rhel_gpgkey_path)))
258261
f = setup_downloader(version=args.network,

0 commit comments

Comments
 (0)