From 7a43ee6ae2317e7f8606eec32ed51e7872a4aa7c Mon Sep 17 00:00:00 2001 From: Rusty Bird Date: Mon, 15 Feb 2021 14:10:42 +0000 Subject: [PATCH] utils: assume Fedora 18+ in dom0 --- qubes/utils.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/qubes/utils.py b/qubes/utils.py index 50e266dd..be31552f 100644 --- a/qubes/utils.py +++ b/qubes/utils.py @@ -27,7 +27,6 @@ import random import string import os import os.path -import re import socket import subprocess import tempfile @@ -44,20 +43,9 @@ LOGGER = logging.getLogger('qubes.utils') def get_timezone(): - # fc18 if os.path.islink('/etc/localtime'): tz_path = '/'.join(os.readlink('/etc/localtime').split('/')) return tz_path.split('zoneinfo/')[1] - # <=fc17 - if os.path.exists('/etc/sysconfig/clock'): - clock_config = open('/etc/sysconfig/clock', "r") - clock_config_lines = clock_config.readlines() - clock_config.close() - zone_re = re.compile(r'^ZONE="(.*)"') - for line in clock_config_lines: - line_match = zone_re.match(line) - if line_match: - return line_match.group(1) # last resort way, some applications makes /etc/localtime # hardlink instead of symlink... tz_info = os.stat('/etc/localtime')