summaryrefslogtreecommitdiff
path: root/cloudinit/distros/sles.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2013-08-05 07:03:17 +0100
committerScott Moser <smoser@ubuntu.com>2013-08-05 07:03:17 +0100
commit270341583ff0c83b4e10ec3d1040b95555f7232f (patch)
tree64555168d9767f63074729cdbe9d34e5ae37eb01 /cloudinit/distros/sles.py
parent219191673b5491fab683ca5ff1befe845c81f6cf (diff)
parent65e49111bcea78342289c671376eba85410ea781 (diff)
downloadvyos-cloud-init-270341583ff0c83b4e10ec3d1040b95555f7232f.tar.gz
vyos-cloud-init-270341583ff0c83b4e10ec3d1040b95555f7232f.zip
reduce finding time zone file to top level distro
remove duplicates of some code.
Diffstat (limited to 'cloudinit/distros/sles.py')
-rw-r--r--cloudinit/distros/sles.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/cloudinit/distros/sles.py b/cloudinit/distros/sles.py
index 904e931a..92a1c307 100644
--- a/cloudinit/distros/sles.py
+++ b/cloudinit/distros/sles.py
@@ -42,7 +42,6 @@ class Distro(distros.Distro):
network_script_tpl = '/etc/sysconfig/network/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)
@@ -151,12 +150,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)
# Adjust the sysconfig clock zone setting
clock_cfg = {
'TIMEZONE': str(tz),