File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/dateutil/zoneinfo/__pycache__/rebuild.cpython-310.pyc
Back
o ;jX � @ sz d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z d dl mZmZ ddg dfdd�Z dd � Zd d� ZdS )� N)� check_call�check_output)�TarFile)�METADATA_FN�ZONEFILENAME�gzc sZ t �� � tj�� d�}tj�t�}z�t�| ��!}|D ]}|� |� � q� fdd�|D �} t || � W d � n1 s;w Y ttj�|t�d��} tj || ddd� W d � n1 s^w Y tj�|t�}t�|d | ��}t�|�D ]}tj�||�} |�| |� qxW d � n1 s�w Y W t�� � dS W t�� � dS t�� � w ) z�Rebuild the internal timezone info in dateutil/zoneinfo/zoneinfo*tar* filename is the timezone tarball from ``ftp.iana.org/tz``. Zzoneinfoc s g | ] }t j�� |��qS � )�os�path�join)�.0�n�Ztmpdirr �M/opt/saltstack/salt/lib/python3.10/site-packages/dateutil/zoneinfo/rebuild.py� <listcomp> s zrebuild.<locals>.<listcomp>N�w� T)�indent� sort_keyszw:%s)�tempfileZmkdtempr r r �dirname�__file__r �open�extract�_run_zicr �json�dumpr �listdir�add�shutil�rmtree)�filename�tag�formatZ zonegroups�metadata�zonedirZ moduledir�tf�name� filepaths�f�target�entryZ entrypathr r r �rebuild s. �����r, c C sh zt ddg�}W n ty } zt|� � d}~ww d|v r#ddg}ng }tdg| d| g | � dS )a� Calls the ``zic`` compiler in a compatible way to get a "fat" binary. Recent versions of ``zic`` default to ``-b slim``, while older versions don't even have the ``-b`` option (but default to "fat" binaries). The current version of dateutil does not support Version 2+ TZif files, which causes problems when used in conjunction with "slim" binaries, so this function is used to ensure that we always get a "fat" binary. Zzicz--helpNs -b z-bZfatz-d)r �OSError�_print_on_nosuchfiler )r% r( � help_text�eZ bloat_argsr r r r ) s �� r c C s | j dkrt�d� dS dS )zdPrint helpful troubleshooting message e is an exception raised by subprocess.check_call() � zzCould not find zic. Perhaps you need to install libc-bin or some other package that provides it, or it's not in your PATH?N)�errno�logging�error)r0 r r r r. A s ��r. )r3 r r r r � subprocessr r �tarfiler Zdateutil.zoneinfor r r, r r. r r r r �<module> s
| ver. 1.4 |
Github
|
.
| PHP 8.2.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings