| Server IP : 35.80.110.71 / Your IP : 216.73.216.52 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ip-172-31-21-44 6.17.0-1019-aws #19~24.04.1-Ubuntu SMP Tue Jun 23 18:53:06 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.3.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/css_parser/__pycache__/ |
Upload File : |
�
��3ez � �� � d dl mZmZmZmZ d dlZd dlZ dgZdZ dZ
d dlZej d dk\ r
d dl
mZ d dl
mZ nd dlmZ d dlmZ G d � d
e� Z G d� de� Zy)� )�unicode_literals�division�absolute_import�print_functionN�ErrorHandler�restructuredtextz$Id$� )� HTTPError)�URLErrorc �v � e Zd ZdZej
dfd�Zd� Zddej j ddfd�Zd � Zy)
�
_ErrorHandlerz-
handles all errors and log messages
Tc �t � d| _ |r|| _ || _ yddl}t j d� | _ t j
|j � }t j d� }|j |� | j j |� | j j |� || _ y)a�
inits log if none given
log
for parse messages, default logs to sys.stderr
defaultloglevel
if none give this is logging.DEBUG
raiseExceptions
- True: Errors will be raised e.g. during building
- False: Errors will be written to the log, this is the
default behaviour when parsing
Tr N�CSSUTILSz%(levelname)s %(message)s)�enabled�_log�sys�logging� getLogger�
StreamHandler�stderr� Formatter�setFormatter�
addHandler�setLevel�raiseExceptions)�self�log�defaultloglevelr r �hdlr� formatters �9/usr/lib/python3/dist-packages/css_parser/errorhandler.py�__init__z_ErrorHandler.__init__( s� � � �����D�I� /���
��)�)�*�5�D�I��(�(����4�D��)�)�*F�G�I����i�(��I�I� � ��&��I�I����/�.��� c � � d}d}||v r.|dk( rd}t | j |� | _ | j S ||v rt | j |� S t d|z � �)zuse self._log items)�debug�info�warn�error�critical�fatal)r �getEffectiveLevelr �
removeHandlerr'