Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
3
vh3 @ s d dl mZmZmZ d dlZd dlZd dlZd dlZd dlZd dl Z d dl
mZ dZ
dddZdd Zd d
Zdd Zd
d Zdd ZdS ) )print_functiondivisionabsolute_importN)ugettextz/etc/rhsm-host/c C sR |rDt |t g t f gkr"|f}x |D ]}tjjt|d q(W tj| dS )zDExit with a code and optional message(s). Saved a few lines of code.
N)typesysstderrwritestrexit)codeZmsgsmsg r /usr/lib/python3.6/utils.pysystem_exit" s
r c C sl yt j| dd W nT tk
rf } z8|jtjkr4dS |jtjkrVtt jtdj | W Y dd}~X nX dS )z
Attempts to create the path given (less any file)
:param path: path
:return: True if changes were made, false otherwise
i )modeFz(Cannot create directory {}
Are you root?NT)
osmakedirsOSErrorerrnoEEXISTEACCESr EX_NOPERM_format)pather r r
create_dir- s "r c C s y2t j| ddd}t|| |j W dQ R X W nX tk
r } z<|jtjkrTdS |jtjkrxtt j
tdj| n W Y dd}~X nX dS )z
Attempts to create a file, with the given contents
:param path: The desired path to the file
:param contents: The contents to write to the file, should json-serializable
:return: True if the file was newly created, false otherwise
wzutf-8)encodingNFz#Cannot create file {}
Are you root?T)
ioopenwrite_to_file_utf8flushr r r r r r r r r )r contentsfr r r r create_file? s
r' c C s t jjtrdS dS )z
Are we running in a docker container or not?
Assumes that if we see host rhsm configuration shared with us, we must
be running in a container.
TF)r r existsHOST_CONFIG_DIRr r r r in_containerW s r* c C s> t jr
| S | dk r6t| tr6t| t r6| jd} | S | S dS )z
Transforms the provided string into unicode if it is not already
:param obj: the string to decode
:return: the unicode format of the string
Nzutf-8)sixZPY3
isinstancer Zunicodedecode)objr r r make_utf8c s
r/ c C s | j ttj|dddd dS )z
Writes out the provided data to the specified file, with user-friendly indentation,
and in utf-8 encoding.
:param file: The file to write to
:param data: The data to be written
:return:
FT)indentZensure_asciiZ sort_keysN)r
r/ jsondumps)filedatar r r r# r s r# )N)Z
__future__r r r r! r2 r r r r+ Zsyspurpose.i18nr r r) r r r' r* r/ r# r r r r s