Uname: Linux server.digisquadtech.com 4.18.0-553.100.1.el8_10.x86_64 #1 SMP Mon Feb 2 04:13:33 EST 2026 x86_64
User: 1091 (madhavfluid)
Group: 1090 (madhavfluid)
Disabled functions: NONE
Safe mode: On[ PHPinfo ]
//usr/lib64/python3.6/site-packages///lsm/__pycache__      ( Reset | Go to )
File Name: _common.cpython-36.pyc
3
.'eM*@s`ddlZddlZddlZddlZddlZddlZyddlmZWn ek
r`ddl    mZYnXddl
Z
y ddl m Z m Z ddlmZWn0ek
rddlm Z m Z ddlmZYnXddlZddlZddlZddlZddlZdSddZdd    ZGd
d d eZd ZdZd dTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdZddddd d!gZdld#d$Zd%d&Zd'd(Z dmd)d*Z!d+d,Z"d-d.Z#d/d0Z$d1d2Z%d3d4Z&d5d6Z'd7d8Z(Gd9d:d:e)Z*ed;d<d=ed>d?d=ed@dAd=GdBdCdCe)Z+dndDdEZ,dFdGZ-GdHdIdIeZ.GdJdKdKeZ/dLdMZ0dNdOZ1GdPdQdQej2Z3e4dRkr\ej5dS)oN)Sequence)URLError    HTTPError)urlparseTcsHdfdd}fdd}t||r,|ndd|fdd}|S)    z
    Creates the get/set properties for the given name.  It assumes that the
    actual attribute is '_' + name

    TODO: Expand this with domain validation to ensure the values are correct.
    _cs
t|S)N)getattr)self)attribute_name/usr/lib64/python3.6/_common.pygetter9sz default_property.<locals>.gettercst||dS)N)setattr)rvalue)r    r
r setter<sz default_property.<locals>.setterNcst||S)N)r )cls)namepropr
r     decoratorAs z#default_property.<locals>.decorator)property)rZ    allow_setdocr rrr
)r    rrr default_property0s   rcCs&t|trttjt|t|trxt|}d|kr\d|krHttjdd|kr\ttjdt    dt
j ttj |y*t jrt|t jrttj dt|Wntk
rYnXtjrt|trttjt|t|tj    rttjt|t
j }t    d|ttjd    tt||dS)
Nz urlopen errorz    Errno 111zConnection refusedz    Errno 113z Host is downzUnexpected network error:
zSSL Certificate error (%s)zUnexpected exception:
zUnexpected exception (TYPE= %s))
isinstancerLsmError ErrorNumberPLUGIN_AUTH_FAILEDstrrNETWORK_CONNREFUSEDNETWORK_HOSTDOWNerror    traceback
format_exc NETWORK_ERRORsslZCertificateErrorAttributeErrorsixPY3ConnectionErrorsocket
PLUGIN_BUGtype)expZdescZ stack_tracer
r
r common_urllib2_error_handlerHs:

    r+c@s*eZdZdZd    ddZddZddZdS)
ProxyzQ
    Used to provide an unambiguous error when a feature is not implemented.
    NcCs
||_dS)z<
        Constructor which takes an object to wrap.
        N) proxied_obj)robjr
r
r __init__{szProxy.__init__cCs*t|j|rtj|j|SttjddS)zJ
        Called each time an attribute is requested of the object
        zUnsupported operationN)hasattrr-    functoolspartial_presentrr
NO_SUPPORT)rrr
r
r __getattr__s zProxy.__getattr__cOst|j|||S)zQ
        Method which is called to invoke the actual method of interest.
        )rr-)rZ_proxy_method_nameargskwargsr
r
r r3szProxy._present)N)__name__
__module__ __qualname____doc__r/r5r3r
r
r
r r,ss

r,z/var/run/lsm/ipc
    ( 2<)BKiBZKBKkMiBZMBMmGiBZGBGgTiBZTBTtPiBZPBPpEiBZEBEerZrWrTrQrNrKFcCsTd}|rLx.tD]&}|t|kr|tt|}|}PqW|s@d}d||fS|SdS)a 
    Convert size in bytes to human readable size
    The return string will follow IEC binary prefixes, e.g. '1.9 KiB'
    For size less than 1024, we do nothing but return the int we get.
    TODO: Need a expect to handle when size is not a int. int() might do.
    NrJz%.2f %s)SIZE_CONS_CHK_LST    SIZE_CONSfloat)sizeZhumanunitsZkey_namer
r
r shs
  rbcCs
t|dS)a
    Convert integer size in bytes to human readable size.
    We are following rules of IEC binary prefixes on size:
        http://en.wikipedia.org/wiki/Gibibyte
    The biggest of unit this function supported is PiB.
    The precision is 2 which means you will get '1.99 KiB'
    T)rb)r`r
r
r size_bytes_2_size_humansrccCsttjdtj}|j|}d}|rl|jd}|jd}|s@t|S|j}|jdd}|tkrlt|t    |}t|S)a
    Convert human readable size string into integer size in bytes.
    Following rules of IEC binary prefixes on size:
        http://en.wikipedia.org/wiki/Gibibyte
    Supported input size_human in these formats:
        '1.9KiB'        # int(1024*1.9)
        '1 KiB'         # 2**10
        '1B'            # 1
        '2K'            # 2*(2**10), treated as '2KiB'
        '2k'            # 2*(2**10), treated as '2KiB'
        '2KB'           # 2*(10**3)
    z
        ^
        ([0-9\.]+)          # 1: number
        [ \t]*              # might have space between number and unit
        ([a-zA-Z]*)         # 2: units
        $
    rr<r=ZIBZiB)
recompileXmatchgroupintupperreplacer^r_)Z
size_humanZregex_size_humanZ regex_matchZ
size_bytesZnumberrar
r
r size_human_2_size_bytess 



 rlcCs yi}t|}|jr|j|d<|jr.|j|d<|jr>|j|d<|jrN|j|d<|jr`|j|d<nd|d<t||d<|rx$|D]}||kr~ttj    d|q~W|rx(|D] }||dkrttj    d    |qW|St
k
r}zttj    d
t |WYdd}~XnXdS) zq
    Common uri parse method that optionally can check for what is needed
    before returning successfully.
    schemenetlocporthostusernameNZ
parametersz&uri missing "%s" or is in invalid formzuri missing query parameter %szuri invalid: reason: %s) rrmrnroZhostnamerquri_parametersrrINVALID_ARGUMENT
ValueErrorr)uriZrequiresZrequired_paramsZrcurZver
r
r     uri_parses:



  

 rxcCsP|jr|j}n|jr(td|dj}niS|rHtdd|jdDSiSdS)Nzhttp:r=cSsg|]}|jdqS)=)split).0partr
r
r
<listcomp>Ssz"uri_parameters.<locals>.<listcomp>&)querypathrdictrz)rurr
r
r rrDsrrc CsFytjdd}Wntk
r,tj}YnX|j|jd|jS)NF)Zusedforsecurityzutf-8)hashlibmd5    ExceptionupdateencodeZ    hexdigest)rVhr
r
r r[s rcCstjr||S||SdS)N)r$r%)abr
r
r int_divfsrcGsdjdd|DS)NcSsg|] }t|qSr
)r)r{r\r
r
r r}ssz$params_to_string.<locals>.<listcomp>)join)r6r
r
r params_to_stringrsrcCs4x.|jdD] }t|r tj||d|q WdS)z
    If a message includes new lines we will create multiple syslog
    entries so that the message is readable.  Otherwise it isn't very readable.
    Hopefully we won't be logging much :-)
    
z: N)rzlensyslog)levelZprgmsglr
r
r post_msgsrcGs$ttjtjjtjdt|dS)Nr)    rrZLOG_ERRosrbasenamesysargvr)rr
r
r rsrcGs(tr$ttjtjjtjdt    |dS)Nr)
LOG_VERBOSErrZLOG_INFOrrrrrr)rr
r
r infosrc@seZdZdZdS)    SocketEOFzL
    Exception class to indicate when we read zero bytes from a socket.
    N)r8r9r:r;r
r
r
r rsrcodez
Error code)rrz Error messagedatazOptional error datac@seZdZdddZddZdS)rNcOs(tj|f||||_||_||_dS)z,
        Class represents an error.
        N)rr/_codeZ_msg_data)rrmessagerr6r7r
r
r r/szLsmError.__init__cCs@tj|j}|jdk    r.|jr.d||j|jfSd||jfSdS)Nz%s: %s Data: %sz%s: %s )rerror_number_to_strrrr)rZ error_no_strr
r
r __str__s
 zLsmError.__str__)N)r8r9r:r/rr
r
r
r rs
    rcCs|||||dS)zC
    Used for gathering additional information about an error.
    )domainr    exceptiondebug
debug_datar
)rrrrrr
r
r addl_error_datasrcCsd|jd}dj|dd}t|rNt|}x2|ddD]}t||}q:Wntd}t||}|S)zn
    Given a class name it returns the class, caller will then
    need to run the constructor to create.
    .Nr<__main__)rzrr
__import__r)
class_namepartsmodulerPcompr
r
r     get_classs

rc@seZdZdZdZdZdZdZdZdZ    dZ
d    Z d
Z d Z d Zd ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-e.Z/e0d,d-Z1d.S)/rrr<r= rE rF4e}i,i-i3i7i^iiiiiiiicCs:x0ttjjD]}tj||krd||fSqWd|S)Nz%s(%d)zUNKNOWN_ERROR_NUMBER(%d))listr_LOCALSkeys)Zerror_noZ    error_strr
r
r rszErrorNumber.error_number_to_strN)2r8r9r:ZOKZLIB_BUGr(Z JOB_STARTEDZTIMEOUTZDAEMON_NOT_RUNNINGZPERMISSION_DENIEDZ NAME_CONFLICTZEXISTS_INITIATORrsZNO_STATE_CHANGErrr!Z    NO_MEMORYr4Z    IS_MASKEDZHAS_CHILD_DEPENDENCYZNOT_FOUND_ACCESS_GROUPZ NOT_FOUND_FSZ NOT_FOUND_JOBZNOT_FOUND_POOLZNOT_FOUND_FS_SSZNOT_FOUND_VOLUMEZNOT_FOUND_NFS_EXPORTZNOT_FOUND_SYSTEMZNOT_FOUND_DISKZ NOT_LICENSEDZNO_SUPPORT_ONLINE_CHANGEZNO_SUPPORT_OFFLINE_CHANGErZPLUGIN_IPC_FAILZPLUGIN_SOCKET_PERMISSIONZPLUGIN_NOT_EXISTZNOT_ENOUGH_SPACEZTRANSPORT_COMMUNICATIONZTRANSPORT_SERIALIZATIONZTRANSPORT_INVALID_ARGZLAST_INIT_IN_ACCESS_GROUPZUNSUPPORTED_SEARCH_KEYZEMPTY_ACCESS_GROUPZPOOL_NOT_READYZ DISK_NOT_FREElocalsr staticmethodrr
r
r
r rsZrc@seZdZdZdZdZdS)    JobStatusr<r=r?N)r8r9r:Z
INPROGRESSZCOMPLETEZERRORr
r
r
r rsrcCst|tr~t|ts,td|tt|ft|dkrXxB|D]}t||d|q>Wqxt||D]\}}t|||qdWnj|t|kr|dk    rt|tj    rt|tj    rdSt
j | st t|| rtd|t|tt|fdS)Nz6%s call is returning a %s, but is expecting a sequencer<rz%s call expected: %s got: %s ) rr    TypeErrorrr)r type_comparezipr$Z string_typesinspectZisclass
issubclass)Z method_nameZexp_typeZact_valavr*Zactr
r
r r%s$

 
   rcsfdd}|S)a4
    Decorator function that allows us to ensure that we are getting the
    correct types back from a function/method call.

    Note: This is normally frowned upon by the python community, but this API
    needs to be language agnostic, so making sure we have the correct types
    is quite important.
    cstjfdd}|S)Ncst||}tdkrRt|tkrBtdjtt|ftj|ntdkrptjd||S)Nr<z.%s call expected %d return values, actual = %dr)rrr8r)r6r7rw)functypesr
r innerMs
  z-return_requires.<locals>.outer.<locals>.inner)r1wraps)rr)r)rr outerLszreturn_requires.<locals>.outerr
)rrr
)rr return_requiresCs     rc@s$eZdZddZddZddZdS)
TestCommoncCsdS)Nr
)rr
r
r setUpeszTestCommon.setUpc"Csy
tWn2tk
r<}z|jt|tWYdd}~XnXytdddWnFtk
r}z*|j|jdko|jdko|jdkWYdd}~XnXtddddd}|j|ddko|ddko|ddko|ddko|ddkdS)    Nr>ZMessageZDatarrrrr)rZ
assertTruerrrrrr)rr\Zedr
r
r test_simplehs
"
  zTestCommon.test_simplecCsdS)Nr
)rr
r
r tearDown|szTestCommon.tearDownN)r8r9r:rrrr
r
r
r rdsrr)TNiiiiii@Biii@iʚ;i@i@llJ)lll lI5l l llNZoll)F)NN)NN)6rrZunittestrdrrcollections.abcr ImportError collectionsrZ urllib.errorrrZ urllib.parserZurllib2r1rr$r"r'rr+objectr,ZUDS_PATHrr^r]rbrcrlrxrrrrrrrrrrrrrrrrrZTestCaserr8mainr
r
r
r <module>s
+)
(
1    

 
Q!


All system for education purposes only. For more tools: Telegram @jackleet

Mr.X Private Shell

Logo
-
New File | New Folder
Command
SQL