C'+S d dl Z d dlZd dlZd dlmZ d dlmZ d dlZddlm Z ddl
mZ edd Zd Z
d
Zd Zd Zd
ZdS ) N)contextmanager)Iterable )CRASH_LOG_PATH)PackageMissingErrorTc # K | dz } t |dd 5 }|V |r:| t j | ddd n# 1 swxY w Y t j || t j | dS # t t f$ r Y dS w xY w# t j | w # t t f$ r Y w w xY wxY w)z Writeable file object that atomically updates a file (using a temporary file).
:param filepath: the file path to be opened
:param fsync: whether to force write the file to disk
z.tmpwutf-8encodingN) openflushosfsyncfilenorenameremoveIOErrorOSError)filepathr tmppathfs py/clwizard/utils.pyatomic_writer sK G
'3
1
1
1 %QGGG
% $$$ % % % % % % % % % % % % % % %
'8$$$ Ig! DD Ig! D se B7 AA(B7 (A,,B7 /A,0B7 B B43B47C%9C
C%C"C%!C""C%c d } t j D ]H} t | }n# t j $ r Y 6w xY w | | r dS IdS )zQ
Detects if the process installing modules is running in the background.
c V h dt | k ph dt | k S )N> /usr/sbin/cloudlinux-wizardinstall
--no-async> /sbin/cloudlinux-wizardr r )set)cmdlines r _is_wizard_cmdlinez9is_background_process_running.