KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/lib/python2.4/site-packages/yum/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/yum/sqlutils.pyo
mò
üüPc@s£dZy
dkZWnej
odkZnXdefd„ƒYZdddd„Zd„Zdd	„Z	dd
„Z
eiddjo
e
Zne	ZdS(
s«
utility functions to handle differences in pysqlite versions
These are from Wichert Akkerman <wichert@deephackmode.org>'s python-dhm
http://www.wiggy.net/code/python-dhm
Nt
TokenizeErrorcBstZdZRS(sTokenizer error class(t__name__t
__module__t__doc__(((t0/usr/lib/python2.4/site-packages/yum/sqlutils.pyRss 	
s"s\cCs²|gddf\}}}}y?x8|o0|d|jo
d}n|djo|d|jo|d}nÜ|d|joY|djo||d7}qM|i|ƒd}x•|d|jo|d}q¸Wnr|d|jo7|djo|d}n||d7}|d}n*|djo|d}n||d7}|d}q$WWnt
j
otd‚nX|o
td‚n|djo|i|ƒn|S(s–String tokenizer

    This function tokenizes a string while taking quotation and
    escaping into account.

      >>> import dhm.strtools
      >>> dhm.strtools.Tokenize("this is a test")
      ['this', 'is', 'a', 'test']
      >>> dhm.strtools.Tokenize("this "is a" test")
      ['this', 'is a', 'test']
      >>> dhm.strtools.Tokenize("this \"is\" a test")
      ['this', '"is"', 'a', 'test']
      >>> dhm.strtools.Tokenize("this "is a test")
      Traceback (most recent call last):
        File "<stdin>", line 1, in ?
        File "/usr/local/lib/python2.2/site-packages/dhm/strtools.py", line 80, in Tokenize
          raise TokenizeError, "Unexpected end of string in quoted text"
      dhm.strtools.TokenizeError: Unexecpted end of string in quoted text

    @param        str: string to tokenize
    @type         str: string
    @param whitespace: whitespace characters seperating tokens
    @type  whitespace: string
    @param     quotes: legal quoting characters
    @type      quotes: string
    @param    escapes: characters which can escape quoting characters
    @type     escapes: string
    @return: list of tokens
    @rtype:  sequence of strings
    iisUnexpected end of strings'Unexpected end of string in quoted textN(tstrtNonetbufferttokenstcurtokentquotetquotest
whitespacetappendtescapest
IndexErrorR(RRRRRR
RR	((RtTokenizesB






cCs»t|ddƒ}g}d}xR|D]J}|idƒo'|i|d d|ƒ|d7}q%|i|ƒq%Wh}d}x&|D]}||d|<|d7}q†Wdi|ƒ|fS(
séConvert from qmark to pyformat parameter style.

    The python DB-API 2.0 specifies four different possible parameter
    styles that can be used by drivers. This function convers from the
    qmark style to pyformat style.

    @param  query: SQL query to transform
    @type   query: string
    @param params: arguments to query
    @type  params: sequence of strings
    @return: converted query and parameters
    @rtype:  tuple with the new command and a dictionary of arguments
    Rt'it?iÿÿÿÿs%%(param%d)ssparam%dt N(RtqueryRtoutputtcountttokentendswithR
tdicttparamstparamtjoin(RRRRRRRR((RtQmarkToPyformatgs"
cCsO|djo|i|ƒSn|iƒ}t||ƒ\}}|i||ƒS(sÐ
    Execute a python < 2.5 (external sqlite module) style query.

    @param cursor: A sqlite cursor
    @param query: The query to execute
    @param params: An optional list of parameters to the query
    N(	RRtcursortexecuteRtstripRtqtp(RRRR!R"((RtexecuteSQLPyFormatˆs
cCs.|djo|i|ƒSn|i||ƒS(s¿
    Execute a python 2.5 (sqlite3) style query.

    @param cursor: A sqlite cursor
    @param query: The query to execute
    @param params: An optional list of parameters to the query
    N(RRRRR(RRR((RtexecuteSQLQmark˜s
ii(
Rtsqlite3tsqlitetImportErrort	ExceptionRRRRR#R$tversion_infot
executeSQL(R&R#RR*R$RR((RRs
H	!



Anon7 - 2021