Paste number 166263: khal tz failure

Paste number 166263: khal tz failure
Pasted by: lfam
When:5 years, 11 months ago
Share:Tweet this! | http://paste.lisp.org/+3KAF
Channel:None
Paste contents:
Raw Source | XML | Display As
tests/settings_test.py:124: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
khal/settings/settings.py:125: in get_config
    config_checks(user_config)
khal/settings/utils.py:105: in config_checks
    config['locale']['default_timezone'])
khal/settings/utils.py:41: in is_timezone
    return get_localzone()
/gnu/store/6am2b8xny5jgg8ri2wcr6414gb5s5x1w-python-tzlocal-1.1.1/lib/python3.4/site-packages/tzlocal-1.1.1-py3.4.egg/tzlocal/unix.py:105: in get_localzone
    _cache_tz = _get_localzone()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

_root = '/'

    def _get_localzone(_root='/'):
        """Tries to find the local timezone configuration.
    
        This method prefers finding the timezone name and passing that to pytz,
        over passing in the localtime file, as in the later case the zoneinfo
        name is unknown.
    
        The parameter _root makes the function look for files like /etc/localtime
        beneath the _root directory. This is primarily used by the tests.
        In normal usage you call the function without parameters."""
    
        tzenv = os.environ.get('TZ')
        if tzenv:
            return _tz_from_env(tzenv)
    
        # Now look for distribution specific configuration files
        # that contain the timezone name.
        tzpath = os.path.join(_root, 'etc/timezone')
        if os.path.exists(tzpath):
            with open(tzpath, 'rb') as tzfile:
                data = tzfile.read()
    
                # Issue #3 was that /etc/timezone was a zoneinfo file.
                # That's a misconfiguration, but we need to handle it gracefully:
                if data[:5] != 'TZif2':
                    etctz = data.strip().decode()
                    # Get rid of host definitions and comments:
                    if ' ' in etctz:
                        etctz, dummy = etctz.split(' ', 1)
                    if '#' in etctz:
                        etctz, dummy = etctz.split('#', 1)
                    return pytz.timezone(etctz.replace(' ', '_'))
    
        # CentOS has a ZONE setting in /etc/sysconfig/clock,
        # OpenSUSE has a TIMEZONE setting in /etc/sysconfig/clock and
        # Gentoo has a TIMEZONE setting in /etc/conf.d/clock
        # We look through these files for a timezone:
    
        zone_re = re.compile('\s*ZONE\s*=\s*\"')
        timezone_re = re.compile('\s*TIMEZONE\s*=\s*\"')
        end_re = re.compile('\"')
    
        for filename in ('etc/sysconfig/clock', 'etc/conf.d/clock'):
            tzpath = os.path.join(_root, filename)
            if not os.path.exists(tzpath):
                continue
            with open(tzpath, 'rt') as tzfile:
                data = tzfile.readlines()
    
            for line in data:
                # Look for the ZONE= setting.
                match = zone_re.match(line)
                if match is None:
                    # No ZONE= setting. Look for the TIMEZONE= setting.
                    match = timezone_re.match(line)
                if match is not None:
                    # Some setting existed
                    line = line[match.end():]
                    etctz = line[:end_re.search(line).start()]
    
                    # We found a timezone
                    return pytz.timezone(etctz.replace(' ', '_'))
    
        # No explicit setting existed. Use localtime
        for filename in ('etc/localtime', 'usr/local/etc/localtime'):
            tzpath = os.path.join(_root, filename)
    
            if not os.path.exists(tzpath):
                continue
            with open(tzpath, 'rb') as tzfile:
                return pytz.tzfile.build_tzinfo('local', tzfile)
    
>       raise pytz.UnknownTimeZoneError('Can not find any timezone configuration')
E       pytz.exceptions.UnknownTimeZoneError: 'Can not find any timezone configuration'

/gnu/store/6am2b8xny5jgg8ri2wcr6414gb5s5x1w-python-tzlocal-1.1.1/lib/python3.4/site-packages/tzlocal-1.1.1-py3.4.egg/tzlocal/unix.py:99: UnknownTimeZoneError
=============== 3 failed, 149 passed, 2 xfailed in 67.46 seconds ===============
phase `check' failed after 68.2 seconds
builder for `/gnu/store/87gdrk55726d626f8jhzmliid1khw1m1-khal-0.7.0.drv' failed with exit code 1
@ build-failed /gnu/store/87gdrk55726d626f8jhzmliid1khw1m1-khal-0.7.0.drv - 1 builder for `/gnu/store/87gdrk55726d626f8jhzmliid1khw1m1-khal-0.7.0.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/87gdrk55726d626f8jhzmliid1khw1m1-khal-0.7.0.drv' failed

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.