Blob Blame History Raw
From 2a4ea01e202e04b0bdc599c0e948eccaf2346d64 Mon Sep 17 00:00:00 2001
From: Radek Vykydal <rvykydal@redhat.com>
Date: Fri, 12 Sep 2014 11:35:02 +0200
Subject: [PATCH 20/20] tui: show software and source spoke iff payload is
 PackagePayload (#1139142)

Resolves: rhbz#1139142

The same what we do in GUI in
commit b2730604a2089236ebb94c22d96bbacc71235c59
---
 pyanaconda/ui/tui/spokes/software.py | 4 ++--
 pyanaconda/ui/tui/spokes/source.py   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
index 44f3da3..5c93d78 100644
--- a/pyanaconda/ui/tui/spokes/software.py
+++ b/pyanaconda/ui/tui/spokes/software.py
@@ -23,7 +23,7 @@ from pyanaconda.flags import flags
 from pyanaconda.ui.tui.spokes import NormalTUISpoke
 from pyanaconda.ui.tui.simpleline import TextWidget, ColumnWidget, CheckboxWidget
 from pyanaconda.threads import threadMgr, AnacondaThread
-from pyanaconda.packaging import MetadataError, DependencyError
+from pyanaconda.packaging import MetadataError, DependencyError, PackagePayload
 from pyanaconda.i18n import N_, _
 
 from pyanaconda.constants import THREAD_PAYLOAD, THREAD_PAYLOAD_MD
@@ -73,7 +73,7 @@ class SoftwareSpoke(NormalTUISpoke):
 
     @property
     def showable(self):
-        return not flags.livecdInstall and not self.data.method.method == "liveimg"
+        return isinstance(self.payload, PackagePayload)
 
     @property
     def status(self):
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
index fc889c6..125ce1a 100644
--- a/pyanaconda/ui/tui/spokes/source.py
+++ b/pyanaconda/ui/tui/spokes/source.py
@@ -25,7 +25,7 @@ from pyanaconda.ui.tui.spokes import EditTUISpoke, NormalTUISpoke
 from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry
 from pyanaconda.ui.tui.simpleline import TextWidget, ColumnWidget
 from pyanaconda.threads import threadMgr, AnacondaThread
-from pyanaconda.packaging import PayloadError, MetadataError
+from pyanaconda.packaging import PayloadError, MetadataError, PackagePayload
 from pyanaconda.i18n import N_, _
 from pyanaconda.image import opticalInstallMedia, potentialHdisoSources
 from pyanaconda.iutil import DataHolder
@@ -204,7 +204,7 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
 
     @property
     def showable(self):
-        return not flags.livecdInstall and not self.data.method.method == "liveimg"
+        return isinstance(self.payload, PackagePayload)
 
     @property
     def status(self):
-- 
1.9.3