As pylint rightfully points out the hasWindows function from bootloader.py is broken, it tries to access bootloaderInfo.dosFilesystems, but bootloaderInfo refers to the bootloaderInfo class, not the module. This does not cause any tracebacks because it tries to access bootloaderInfo.dosFilesystems while iterating over bootloader.images, and bootloader.images has not been set up at this time (so its an empty dict). Thus hasWindows() will always return false, as there is no way to determine hasWindows at this point during the installation (we have not yet paritioned, so any exsting windows partitions may end up being removed), this patches fixes things by simply removing the hasWindows function and fixing up any callers of it. --- bootloader.py | 9 --------- iw/timezone_gui.py | 4 ---- textw/timezone_text.py | 4 ---- 3 files changed, 0 insertions(+), 17 deletions(-) diff --git a/bootloader.py b/bootloader.py index e2b06a8..2cb9741 100644 --- a/bootloader.py +++ b/bootloader.py @@ -230,12 +230,3 @@ def writeBootloader(anaconda): "will not be changed.")) dosync() - -def hasWindows(bl): - foundWindows = False - for (k,v) in bl.images.getImages().iteritems(): - if v[0].lower() == 'other' and v[2] in bootloaderInfo.dosFilesystems: - foundWindows = True - break - - return foundWindows diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py index c5ecd88..1a821b7 100644 --- a/iw/timezone_gui.py +++ b/iw/timezone_gui.py @@ -30,7 +30,6 @@ import sys from timezone_map_gui import TimezoneMap, Enum from iw_gui import * from booty.bootloaderInfo import dosFilesystems -from bootloader import hasWindows from constants import * import gettext @@ -104,9 +103,6 @@ class TimezoneWindow(InstallWindow): self.tz.setCurrent(self.zonetab.findEntryByTZ(self.default)) self.utcCheckbox.set_active(asUTC) - if not anaconda.ksdata: - self.utcCheckbox.set_active(not hasWindows(anaconda.bootloader)) - self.notebook.remove(self.vbox) return self.vbox diff --git a/textw/timezone_text.py b/textw/timezone_text.py index c78442a..d274d8c 100644 --- a/textw/timezone_text.py +++ b/textw/timezone_text.py @@ -24,7 +24,6 @@ import iutil from time import * from snack import * from constants_text import * -from bootloader import hasWindows from scdate.core import zonetab from constants import * @@ -73,9 +72,6 @@ class TimezoneWindow: t = TextboxReflowed(30, _("In which time zone are you located?")) - if not anaconda.ksdata and not hasWindows(anaconda.bootloader): - asUtc = True - # # disabling this for now # -- 1.7.0.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list