diff options
author | Joshua Harlow <harlowja@gmail.com> | 2013-07-24 22:12:33 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2013-07-24 22:12:33 -0700 |
commit | 696bcc1f0acc67646872cd6ce1b90375ca0ae068 (patch) | |
tree | a930058df6a51076e7527dadaac099c42ac0d2f6 /cloudinit/distros/rhel.py | |
parent | 8f3bfd9db16bfc6cd2acfb068b9ffe14ea1570d3 (diff) | |
download | vyos-cloud-init-696bcc1f0acc67646872cd6ce1b90375ca0ae068.tar.gz vyos-cloud-init-696bcc1f0acc67646872cd6ce1b90375ca0ae068.zip |
Remove duplicate timezone file finding and error raising.
Diffstat (limited to 'cloudinit/distros/rhel.py')
-rw-r--r-- | cloudinit/distros/rhel.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/cloudinit/distros/rhel.py b/cloudinit/distros/rhel.py index a022ca60..ece1a5ff 100644 --- a/cloudinit/distros/rhel.py +++ b/cloudinit/distros/rhel.py @@ -51,7 +51,6 @@ class Distro(distros.Distro): network_script_tpl = '/etc/sysconfig/network-scripts/ifcfg-%s' resolve_conf_fn = "/etc/resolv.conf" tz_local_fn = "/etc/localtime" - tz_zone_dir = "/usr/share/zoneinfo" def __init__(self, name, cfg, paths): distros.Distro.__init__(self, name, cfg, paths) @@ -164,12 +163,7 @@ class Distro(distros.Distro): return distros.Distro._bring_up_interfaces(self, device_names) def set_timezone(self, tz): - # TODO(harlowja): move this code into - # the parent distro... - tz_file = os.path.join(self.tz_zone_dir, str(tz)) - if not os.path.isfile(tz_file): - raise RuntimeError(("Invalid timezone %s," - " no file found at %s") % (tz, tz_file)) + tz_file = self._find_tz_file(tz) if self._dist_uses_systemd(): # Currently, timedatectl complains if invoked during startup # so for compatibility, create the link manually. |