diff options
author | Ben Howard <ben.howard@canonical.com> | 2013-08-20 09:58:30 -0600 |
---|---|---|
committer | Ben Howard <ben.howard@canonical.com> | 2013-08-20 09:58:30 -0600 |
commit | 89d58c94d59c62dddea3f77b7a805c1afa2ca955 (patch) | |
tree | 6b7cd86a373706730f0ec11f06517fc2a003f7c9 /cloudinit/distros/sles.py | |
parent | e683ab2baa3e67614edcd409122bd1aec99737e0 (diff) | |
parent | b2ee0966793f3a9c7d8e92ce1c13b9583a9a76e7 (diff) | |
download | vyos-cloud-init-89d58c94d59c62dddea3f77b7a805c1afa2ca955.tar.gz vyos-cloud-init-89d58c94d59c62dddea3f77b7a805c1afa2ca955.zip |
Updated merge proposal with current tree
Diffstat (limited to 'cloudinit/distros/sles.py')
-rw-r--r-- | cloudinit/distros/sles.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cloudinit/distros/sles.py b/cloudinit/distros/sles.py index 904e931a..f2ac4efc 100644 --- a/cloudinit/distros/sles.py +++ b/cloudinit/distros/sles.py @@ -18,8 +18,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import os - from cloudinit import distros from cloudinit.distros.parsers.hostname import HostnameConf @@ -42,7 +40,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 +148,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), |