
    l:i                     R    d dl Z d dlmZmZmZ  ed      d        Zed        Zd Zy)    N)for_appreplace_commandeagerifconfigc                     d| j                   v S )Nz6error fetching interface information: Device not found)output)commands    ^/var/www/html/bot/venv/lib/python3.12/site-packages/thefuck/rules/ifconfig_device_not_found.pymatchr      s    Cnn     c               #     K   t        j                  ddgt         j                        } | j                  j	                         D ]C  }|j                         }|s|dk7  s|j                  d      r.|j                  d      d    E y w)Nr   z-a)stdout
 r   )
subprocessPopenPIPEr   	readlinesdecode
startswithsplit)proclines     r
   _get_possible_interfacesr      so     Z.zGD%%' %{{}DDL)=**S/!$$%s   ABB B2Bc                 r    | j                   j                  d      d   d d }t               }t        | ||      S )Nr   r   )r   r   r   r   )r	   	interfacepossible_interfacess      r
   get_new_commandr      s;    $$S)!,Sb1I247I/BCCr   )r   thefuck.utilsr   r   r   r   r   r    r   r
   <module>r"      sA     9 9 	 
 % %Dr   