[master/rhel7-branch][PATCH 1/3] Get rid of some unnecessary files. (#965985)

Samantha N. Bueno sbueno+anaconda at redhat.com
Mon Jun 15 23:48:01 UTC 2015


New rescue mode doesn't require these; nothing else uses them.

Related: rhbz#965985
---
 po/POTFILES.in                     |   2 -
 pyanaconda/installinterfacebase.py |  32 ----------
 pyanaconda/text.py                 | 128 -------------------------------------
 3 files changed, 162 deletions(-)
 delete mode 100644 pyanaconda/installinterfacebase.py
 delete mode 100644 pyanaconda/text.py

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 7b5d1ac..3d226fb 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,7 +11,6 @@ pyanaconda/exception.py
 pyanaconda/image.py
 pyanaconda/install.py
 pyanaconda/installclass.py
-pyanaconda/installinterfacebase.py
 pyanaconda/iutil.py
 pyanaconda/kickstart.py
 pyanaconda/network.py
@@ -19,7 +18,6 @@ pyanaconda/product.py
 pyanaconda/regexes.py
 pyanaconda/rescue.py
 pyanaconda/storage_utils.py
-pyanaconda/text.py
 pyanaconda/users.py
 pyanaconda/vnc.py
 
diff --git a/pyanaconda/installinterfacebase.py b/pyanaconda/installinterfacebase.py
deleted file mode 100644
index c657236..0000000
--- a/pyanaconda/installinterfacebase.py
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# installinterfacebase.py: a baseclass for anaconda interface classes
-#
-# Copyright (C) 2010  Red Hat, Inc.  All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Author(s): Hans de Goede <hdegoede at redhat.com>
-
-import logging
-log = logging.getLogger("anaconda")
-
-class InstallInterfaceBase(object):
-    def messageWindow(self, title, text, ty="ok", default = None,
-             custom_buttons=None,  custom_icon=None):
-        raise NotImplementedError
-
-    def detailedMessageWindow(self, title, text, longText=None, ty="ok",
-                              default=None, custom_icon=None,
-                              custom_buttons=None, expanded=False):
-        raise NotImplementedError
diff --git a/pyanaconda/text.py b/pyanaconda/text.py
deleted file mode 100644
index a049c30..0000000
--- a/pyanaconda/text.py
+++ /dev/null
@@ -1,128 +0,0 @@
-#
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006  Red Hat, Inc.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-# Author(s): Erik Troan <ewt at redhat.com>
-#            Matt Wilson <msw at redhat.com>
-#
-
-from snack import ButtonBar, ButtonChoiceWindow, Entry, GridForm, Scale, TextboxReflowed
-from pyanaconda.constants_text import TEXT_OK_BUTTON, TEXT_CANCEL_BUTTON, TEXT_OK_CHECK
-from pyanaconda.i18n import _
-
-class WaitWindow:
-    def pop(self):
-        self.screen.popWindow()
-        self.screen.refresh()
-
-    def refresh(self):
-        pass
-
-    def __init__(self, screen, title, text):
-        self.screen = screen
-        width = 40
-        if (len(text) < width):
-            width = len(text)
-
-        t = TextboxReflowed(width, text)
-
-        g = GridForm(self.screen, title, 1, 1)
-        g.add(t, 0, 0)
-        g.draw()
-        self.screen.refresh()
-
-class OkCancelWindow:
-    def getrc(self):
-        return self.rc
-
-    def __init__(self, screen, title, text):
-        rc = ButtonChoiceWindow(screen, title, text, buttons=[TEXT_OK_BUTTON, _("Cancel")])
-        if rc == _("Cancel").lower():
-            self.rc = 1
-        else:
-            self.rc = 0
-
-class ProgressWindow:
-    def pop(self):
-        self.screen.popWindow()
-        self.screen.refresh()
-        del self.scale
-        self.scale = None
-
-    def pulse(self):
-        pass
-
-    def set(self, amount):
-        self.scale.set(int(float(amount) * self.multiplier))
-        self.screen.refresh()
-
-    def refresh(self):
-        pass
-
-    def __init__(self, screen, title, text, total, updpct = 0.05, pulse = False):
-        self.multiplier = 1
-        if total == 1.0:
-            self.multiplier = 100
-        self.screen = screen
-        width = 55
-        if (len(text) > width):
-            width = len(text)
-
-        t = TextboxReflowed(width, text)
-
-        g = GridForm(self.screen, title, 1, 2)
-        g.add(t, 0, 0, (0, 0, 0, 1), anchorLeft=1)
-
-        self.scale = Scale(int(width), int(float(total) * self.multiplier))
-        if not pulse:
-            g.add(self.scale, 0, 1)
-
-        g.draw()
-        self.screen.refresh()
-
-class PassphraseEntryWindow:
-    def __init__(self, screen, device):
-        self.screen = screen
-        self.txt = _("Device %s is encrypted. In order to "
-                     "access the device's contents during "
-                     "installation you must enter the device's "
-                     "passphrase below.") % (device,)
-        self.rc = None
-
-    def run(self):
-        toplevel = GridForm(self.screen, _("Passphrase"), 1, 3)
-
-        txt = TextboxReflowed(65, self.txt)
-        toplevel.add(txt, 0, 0)
-
-        passphraseentry = Entry(60, password = 1)
-        toplevel.add(passphraseentry, 0, 1, (0,0,0,1))
-
-        buttons = ButtonBar(self.screen, [TEXT_OK_BUTTON, TEXT_CANCEL_BUTTON])
-        toplevel.add(buttons, 0, 2, growx=1)
-
-        rc = toplevel.run()
-        res = buttons.buttonPressed(rc)
-
-        passphrase = None
-        if res == TEXT_OK_CHECK or rc == "F12":
-            passphrase = passphraseentry.value().strip()
-
-        self.rc = passphrase
-        return self.rc
-
-    def pop(self):
-        self.screen.popWindow()
-- 
1.9.3



More information about the anaconda-patches mailing list