관리-도구
편집 파일: messaging.cpython-311.pyc
� �܋f� � �& � d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dl m Z d dl mZ d dl mZ d dl Z d dlmZ d d lmZ ej e� � Z ej d� � � ej � � � � d dlZd dlZd dlZ ej d ej ej dd d d d � � � � Z ej de� � \ ZZZ Z!ed k rdZn# e"e#f$ r dZY nw xY wd d�d+d�Z$ed,d-d�� � Z%d.d/d�Z&d0d�Z'd1d2d$�Z( d3d4d'�Z)d5d*�Z*dS )6� )�annotations)�Iterable)�contextmanagerN)�Optional)�TextIO)�Union)�url� )�sqla_compat�alembic�HHHHF��quiet�streamr �text�Union[str, bytes]r �bool�return�Nonec � � |rd S t | dd� � pd}|D ]j}t |t � � s|� |d� � }|� |� � } | � |� � �Y# t $ r Y d S w xY wd S )N�encoding�ascii�replace)�getattr� isinstance�bytes�encode�decode�write�OSError)r r r r �ts �M/opt/cloudlinux/venv/lib64/python3.11/site-packages/alembic/util/messaging.py�write_outstreamr# $ s� � � � ����v�z�7�3�3�>�w�H� � � ���!�U�#�#� .�����9�-�-�A� �H�H�X���� ��L�L��O�O�O�O��� � � � �E�E�E� ���� � s �A3�3 B�B� status_msg�str�newlinec # � K � t | dz |d|�� � d V � |st t j d� � d S d S # |st t j d� � � xY w)Nz ...T)�flushr z done z FAILED )�msgr# �sys�stdout)r$ r&