fbcaed
From 2a4ea01e202e04b0bdc599c0e948eccaf2346d64 Mon Sep 17 00:00:00 2001
fbcaed
From: Radek Vykydal <rvykydal@redhat.com>
fbcaed
Date: Fri, 12 Sep 2014 11:35:02 +0200
fbcaed
Subject: [PATCH 20/20] tui: show software and source spoke iff payload is
fbcaed
 PackagePayload (#1139142)
fbcaed
fbcaed
Resolves: rhbz#1139142
fbcaed
fbcaed
The same what we do in GUI in
fbcaed
commit b2730604a2089236ebb94c22d96bbacc71235c59
fbcaed
---
fbcaed
 pyanaconda/ui/tui/spokes/software.py | 4 ++--
fbcaed
 pyanaconda/ui/tui/spokes/source.py   | 4 ++--
fbcaed
 2 files changed, 4 insertions(+), 4 deletions(-)
fbcaed
fbcaed
diff --git a/pyanaconda/ui/tui/spokes/software.py b/pyanaconda/ui/tui/spokes/software.py
fbcaed
index 44f3da3..5c93d78 100644
fbcaed
--- a/pyanaconda/ui/tui/spokes/software.py
fbcaed
+++ b/pyanaconda/ui/tui/spokes/software.py
fbcaed
@@ -23,7 +23,7 @@ from pyanaconda.flags import flags
fbcaed
 from pyanaconda.ui.tui.spokes import NormalTUISpoke
fbcaed
 from pyanaconda.ui.tui.simpleline import TextWidget, ColumnWidget, CheckboxWidget
fbcaed
 from pyanaconda.threads import threadMgr, AnacondaThread
fbcaed
-from pyanaconda.packaging import MetadataError, DependencyError
fbcaed
+from pyanaconda.packaging import MetadataError, DependencyError, PackagePayload
fbcaed
 from pyanaconda.i18n import N_, _
fbcaed
 
fbcaed
 from pyanaconda.constants import THREAD_PAYLOAD, THREAD_PAYLOAD_MD
fbcaed
@@ -73,7 +73,7 @@ class SoftwareSpoke(NormalTUISpoke):
fbcaed
 
fbcaed
     @property
fbcaed
     def showable(self):
fbcaed
-        return not flags.livecdInstall and not self.data.method.method == "liveimg"
fbcaed
+        return isinstance(self.payload, PackagePayload)
fbcaed
 
fbcaed
     @property
fbcaed
     def status(self):
fbcaed
diff --git a/pyanaconda/ui/tui/spokes/source.py b/pyanaconda/ui/tui/spokes/source.py
fbcaed
index fc889c6..125ce1a 100644
fbcaed
--- a/pyanaconda/ui/tui/spokes/source.py
fbcaed
+++ b/pyanaconda/ui/tui/spokes/source.py
fbcaed
@@ -25,7 +25,7 @@ from pyanaconda.ui.tui.spokes import EditTUISpoke, NormalTUISpoke
fbcaed
 from pyanaconda.ui.tui.spokes import EditTUISpokeEntry as Entry
fbcaed
 from pyanaconda.ui.tui.simpleline import TextWidget, ColumnWidget
fbcaed
 from pyanaconda.threads import threadMgr, AnacondaThread
fbcaed
-from pyanaconda.packaging import PayloadError, MetadataError
fbcaed
+from pyanaconda.packaging import PayloadError, MetadataError, PackagePayload
fbcaed
 from pyanaconda.i18n import N_, _
fbcaed
 from pyanaconda.image import opticalInstallMedia, potentialHdisoSources
fbcaed
 from pyanaconda.iutil import DataHolder
fbcaed
@@ -204,7 +204,7 @@ class SourceSpoke(SourceSwitchHandler, EditTUISpoke):
fbcaed
 
fbcaed
     @property
fbcaed
     def showable(self):
fbcaed
-        return not flags.livecdInstall and not self.data.method.method == "liveimg"
fbcaed
+        return isinstance(self.payload, PackagePayload)
fbcaed
 
fbcaed
     @property
fbcaed
     def status(self):
fbcaed
-- 
fbcaed
1.9.3
fbcaed