[anaconda:master 3/3] Remove UserInterface.basepath and UserInterface.basemask definitions.

mulhern amulhern at redhat.com
Fri Dec 5 14:31:48 UTC 2014

These are not used as class attributes, only as local variables.
Since they are not used in UserInterface class definition, they are
not used at all by this class or its subclasses. They are not used
by any external class in anaconda or initial-setup.

Leaving alone the definitions of basemask and basepath in descendants of
UserInterface. They are used as local variables in those class definitions.
Refactoring the code that uses them into a method is the right thing to do.
Unfortunately, this method should serve not only GraphicalUserInterface and
TextUserInterface, but also classes that extend those in initial-setup.
A method that served all would be hopelessly convoluted. Hopefully a
better solution will make itself known at some point.

Attention was directed to this problem by the pointless-overrides pylint
checker, which indicated that GraphicalUserInterface.basemask and
TextUserInterface.basemask overrode UserInterface.basemask pointlessly.

Signed-off-by: mulhern <amulhern at redhat.com>
 pyanaconda/ui/__init__.py | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/pyanaconda/ui/__init__.py b/pyanaconda/ui/__init__.py
index 209f9a1..a12e88b 100644
--- a/pyanaconda/ui/__init__.py
+++ b/pyanaconda/ui/__init__.py
@@ -72,9 +72,6 @@ class UserInterface(object):
         from pyanaconda.errors import errorHandler
         errorHandler.ui = self
-    basepath = os.path.dirname(__file__)
-    basemask = "pyanaconda.ui"
     paths = PathDict({})

More information about the anaconda-patches mailing list