--- pyanaconda/network.py | 2 -- 1 file changed, 2 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py index 6a92d24..6318607 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -775,8 +775,6 @@ def write_sysconfig_network(rootpath, ksdata, overwrite=False): f = open(cfgfile, "w") f.write("# Generated by anaconda\n") f.write("NETWORKING=yes\n") - f.write("HOSTNAME=") - f.write("HOSTNAME=%s\n" % ksdata.network.hostname)
gateway = ipv6_defaultgw = None
When testing for membership of the NoSuchPackage/NoSuchGroup exceptions, they appear to be first converted with str(), resulting in the name of the group or package in question. There are bound to be more instances of this in the future. Thus, let's just go by the names of things. --- pyanaconda/errors.py | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-)
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py index 5c2cd27..8917184 100644 --- a/pyanaconda/errors.py +++ b/pyanaconda/errors.py @@ -226,33 +226,29 @@ class ErrorHandler(object): kwargs -- A dict of keyword arguments. The arguments expected depends on the exception being handled. """ - from pyanaconda.packaging import NoSuchGroup, NoSuchPackage - import pyanaconda.storage.errors as StorageError - from pykickstart.errors import KickstartError - rc = ERROR_RAISE
if not self.ui: raise
- _map = {KickstartError: self._kickstartErrorHandler, - StorageError.PartitioningError: self._partitionErrorHandler, - StorageError.FSResizeError: self._fsResizeHandler, - StorageError.FSMigrateError: self._fsMigrateHandler, - StorageError.NoDisksError: self._noDisksHandler, - StorageError.DirtyFSError: self._dirtyFSHandler, - StorageError.FSTabTypeMismatchError: self._fstabTypeMismatchHandler, - InvalidImageSizeError: self._invalidImageSizeHandler, - MissingImageError: self._missingImageHandler, - MediaMountError: self._mediaMountHandler, - MediaUnmountError: self._mediaUnmountHandler, - NoSuchGroup: self._noSuchGroupHandler, - NoSuchPackage: self._noSuchPackageHandler, - ScriptError: self._scriptErrorHandler} - - if exn in _map: + _map = {"KickstartError": self._kickstartErrorHandler, + "PartitioningError": self._partitionErrorHandler, + "FSResizeError": self._fsResizeHandler, + "FSMigrateError": self._fsMigrateHandler, + "NoDisksError": self._noDisksHandler, + "DirtyFSError": self._dirtyFSHandler, + "FSTabTypeMismatchError": self._fstabTypeMismatchHandler, + "InvalidImageSizeError": self._invalidImageSizeHandler, + "MissingImageError": self._missingImageHandler, + "MediaMountError": self._mediaMountHandler, + "MediaUnmountError": self._mediaUnmountHandler, + "NoSuchGroup": self._noSuchGroupHandler, + "NoSuchPackage": self._noSuchPackageHandler, + "ScriptError": self._scriptErrorHandler} + + if exn.__class__.__name__ in _map: kwargs["exception"] = exn - rc = _map[exn](*args, **kwargs) + rc = _map[exn.__class__.__name__](*args, **kwargs)
return rc
--- pyanaconda/timezone.py | 8 -------- tests/pyanaconda_test/timezone_test.py | 2 -- 2 files changed, 10 deletions(-)
diff --git a/pyanaconda/timezone.py b/pyanaconda/timezone.py index 61cdd9a..0b7173d 100644 --- a/pyanaconda/timezone.py +++ b/pyanaconda/timezone.py @@ -69,14 +69,6 @@ def write_timezone_config(timezone, root): (rooted_tz_file, oserr.strerror))
try: - with open(os.path.normpath(root + "/etc/sysconfig/clock"), "w") as fobj: - fobj.write('ZONE="%s"\n' % timezone.timezone) - except IOError as ioerr: - msg = "Error while writing /etc/sysconfig/clock file: %s" % \ - ioerr.strerror - raise TimezoneConfigError(msg) - - try: fobj = open(os.path.normpath(root + "/etc/adjtime"), "r") lines = fobj.readlines() fobj.close() diff --git a/tests/pyanaconda_test/timezone_test.py b/tests/pyanaconda_test/timezone_test.py index 499989f..a53f292 100644 --- a/tests/pyanaconda_test/timezone_test.py +++ b/tests/pyanaconda_test/timezone_test.py @@ -51,8 +51,6 @@ class TimeZoneTest(mock.TestCase): f.close()
tz.write() - example = 'ZONE="%s"\n' % ZONE - self.assertEqual(self.fs['/mnt/sysimage/etc/sysconfig/clock'], example) self.assertEqual(self.fs['/mnt/sysimage/etc/adjtime'], ADJTIME)
This is a little touchy, but you first have to go to the source spoke. This will cause all widgets to be displayed. Then go to the destination spoke and choose to autopart all your drives. Then go back to the source spoke. We need to both set the ISO-related widgets to no_show_all and hide them due to the previous visit. --- pyanaconda/ui/gui/spokes/source.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py index 8d7a0f6..7738728 100644 --- a/pyanaconda/ui/gui/spokes/source.py +++ b/pyanaconda/ui/gui/spokes/source.py @@ -679,9 +679,12 @@ class SourceSpoke(NormalSpoke): idx += 1
# Again, only display these widgets if an HDISO source was found. + self._isoBox.set_no_show_all(not added) + self._isoBox.set_visible(added) + self._isoButton.set_no_show_all(not added) + self._isoButton.set_visible(added) + if added: - self._isoBox.set_no_show_all(False) - self._isoButton.set_no_show_all(False) combo = self.builder.get_object("isoPartitionCombo") combo.set_active(active)
Ack to all of these
anaconda-patches@lists.fedorahosted.org