ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyc in qrscanner-0.3.1 vs ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyc in qrscanner-0.4

- old
+ new

@@ -1,82 +1,78 @@ -Ñò -âqLc@s5dZdZddkZddkZddkZddkZddkZd„Zdei _ -eei _ ga ha ei adagad„Zd„ZeiiZd „Zd +ó +âqLc@s5dZdZddlZddlZddlZddlZddlZd„Zdej _ +eej _ ga ia ej adagad„Zd„ZejjZd „Zd efd „ƒYZd efd „ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZeadd„ZdS(sQSCons.SConsign Writing and reading information to the .sconsign file or files. -s;src/engine/SCons/SConsign.py 5023 2010/06/14 22:05:46 sconsiÿÿÿÿNcCs!tiitiid|ƒdS(Ns#Ignoring corrupt .sconsign file: %s(tSConstWarningstwarntCorruptSConsignWarning(tfilename((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytcorrupt_dblite_warning)sis .sconsigncCsz|ii}tiitƒ oâ|ioØd}xÏ|g|iD]¹}|i|ƒoyt||fSWqôt j -ox|i -tƒ}yt i ||ƒ}t|<Wnt tfj -oqðX|djoti|ƒn||fSqôXnd}qAWnyt|dfSWn_t j -o5t i tdƒ}t|<ti|ƒ|dfStj -odGtGH‚nXdS(Ntctrs -DataBase =(tfstToptostpathtisabstDB_Namet repositoriestis_undertDataBasetKeyErrort entry_abspatht DB_ModuletopentIOErrortOSErrort DB_sync_listtappendt TypeError(tdirttoptmodetdR tdb((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt Get_DataBase>s6     cCsgagadS(syReset global state. Used by unit tests that end up using - SConsign multiple times to get a clean slate for each test.N(t sig_filesR(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytResetZscCs`xtD]}|iddƒqWx8tD]0}y |i}Wntj -oq(X|ƒq(WdS(Ntsynci(R twriteRR"tAttributeError(tsig_fileRt -syncmethod((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR#cs t SConsignEntrycBs/eZdZdZd„Zd„Zd„ZRS(s  +s;src/engine/SCons/SConsign.py 5023 2010/06/14 22:05:46 sconsiÿÿÿÿNcCs!tjjtjjd|ƒdS(Ns#Ignoring corrupt .sconsign file: %s(tSConstWarningstwarntCorruptSConsignWarning(tfilename((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytcorrupt_dblite_warning)sis .sconsigncCsk|jj}tjjtƒ r÷|jr÷d}xÆ|g|jD]±}|j|ƒrêyt||fSWqêt k +ræ|j +tƒ}yt j ||ƒ}t|<Wnt tfk +r¼qçX|dkrÙtj|ƒn||fSqêXnd}q?Wnyt|dfSWn[t k +rJt j tdƒ}t|<tj|ƒ|dfStk +rfdGtGH‚nXdS(Ntctrs +DataBase =(tfstToptostpathtisabstDB_Namet repositoriestis_undertDataBasetKeyErrort entry_abspatht DB_ModuletopentIOErrortOSErrort DB_sync_listtappendt TypeError(tdirttoptmodetdR tdb((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt Get_DataBase>s4       +  cCsgagadS(syReset global state. Used by unit tests that end up using + SConsign multiple times to get a clean slate for each test.N(t sig_filesR(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytResetZscCs^xtD]}|jddƒqWx6tD].}y |j}Wntk +rNq(X|ƒq(WdS(Ntsynci(R twriteRR"tAttributeError(tsig_fileRt +syncmethod((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR#cs    t SConsignEntrycBs/eZdZdZd„Zd„Zd„ZRS(s  Wrapper class for the generic entry in a .sconsign file. The Node subclass populates it with attributes as it pleases. XXX As coded below, we do expect a '.binfo' attribute to be added, but we'll probably generalize this in the next refactorings. - icCs |i}dS(N(tcurrent_version_id(tselft _version_id((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt__init__xscCs|iiƒdS(N(tbinfotconvert_to_sconsign(R)((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR-|scCs|ii||ƒdS(N(R,tconvert_from_sconsign(R)Rtname((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR.~s(t__name__t + icCs |j}dS(N(tcurrent_version_id(tselft _version_id((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt__init__xscCs|jjƒdS(N(tbinfotconvert_to_sconsign(R)((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR-|scCs|jj||ƒdS(N(R,tconvert_from_sconsign(R)Rtname((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR.~s(t__name__t __module__t__doc__R(R+R-R.(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR'os   tBasecBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(s This is the controlling class for the signatures for the collection of entries associated with a specific directory. The actual directory association will be maintained by a subclass that is specific to the underlying storage method. This class provides a common set of methods for fetching and storing the individual bits of information that make up signature entry. - cCsh|_t|_h|_dS(N(tentriestFalsetdirtyt to_be_merged(R)((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+Šs  cCs |i|S(s6 + cCsi|_t|_i|_dS(N(tentriestFalsetdirtyt to_be_merged(R)((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+Šs  cCs |j|S(s6 Fetch the specified entry attribute. - (R4(R)R((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt get_entryscCs||i|<t|_dS(s + (R4(R)R((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt get_entryscCs||j|<t|_dS(s Set the entry. - N(R4tTrueR6(R)Rtobj((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt set_entry•s cCsdS(N((R)RR:((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytdo_not_set_entryœscCs<|iƒ}|ii|iƒƒ||i|<t|_dS(N(tget_stored_infoR,tmerget get_binfoR7R9R6(R)Rtnodetentry((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt -store_infoŸs  cCsdS(N((R)RR@((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytdo_not_store_info¥scCs|xl|iiƒD][\}}|iƒ}y |i}Wntj -onX|i|iƒƒ||i|<qWh|_dS(N(R7titemsR=tninfoR$R>t get_ninfoR4(R)tkeyR@RARE((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR>¨s   ( + N(R4tTrueR6(R)Rtobj((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt set_entry•s cCsdS(N((R)RR:((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytdo_not_set_entryœscCs<|jƒ}|jj|jƒƒ||j|<t|_dS(N(tget_stored_infoR,tmerget get_binfoR7R9R6(R)Rtnodetentry((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt +store_infoŸs  cCsdS(N((R)RR@((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytdo_not_store_info¥scCszxj|jjƒD]Y\}}|jƒ}y |j}Wntk +rHnX|j|jƒƒ||j|<qWi|_dS(N(R7titemsR=tninfoR$R>t get_ninfoR4(R)tkeyR@RARE((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR>¨s   ( R0R1R2R+R8R;R<RBRCR>(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR3s      tDBcBs#eZdZd„Zdd„ZRS(s¬ A Base subclass that reads and writes signature information from a global .sconsign.db* file--the actual file suffix is determined by the database module. - c -CsWti|ƒ||_t|ƒ\}}t|iƒ}y||}Wntj -onÄXy<ti|ƒ|_ t -|i t ƒph|_ t ‚nWnSt j -o -‚n?tj -o2}tiitiid|ii|fƒnXx-|i iƒD]\}}|i||ƒqýW|djo|i|_|i|_nti|ƒdS(Ns*Ignoring corrupt sconsign entry : %s (%s) + c CsMtj|ƒ||_t|ƒ\}}t|jƒ}y||}Wntk +rXn½Xy:tj|ƒ|_ t +|j t ƒs’i|_ t ‚nWnOt k +r©‚n<tk +rä}tjjtjjd|jj|fƒnXx-|j jƒD]\}}|j||ƒqõW|dkr<|j|_|j|_ntj|ƒdS(Ns*Ignoring corrupt sconsign entry : %s (%s) R(R3R+RRtnormcasettpathRtpickletloadsR4t isinstancetdictRtKeyboardInterruptt ExceptionRRRRRDR.R<R;RCRBR R( R)RRRR t -rawentriesteRGRA((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+½s2      icCs¼|ipdS|iƒt|iƒ\}}t|iiƒ}x'|iiƒD]\}}|iƒqPWt i -|idƒ||<|o.y |i }Wnt j -oq¸X|ƒndS(Ni( R6R>RRRIR R4RDR-RKtdumpsR"R$(R)R"RRR RGRAR&((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR#ås - -  (R0R1R2R+R#(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyRH·s (tDircBseZddd„ZRS(cCsti|ƒ|pdSti|ƒ|_t|itƒph|_t‚n|o4x1|iiƒD]\}}|i ||ƒqhWndS(s8 +rawentriesteRGRA((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+½s0        icCs¶|js dS|jƒt|jƒ\}}t|jjƒ}x'|jjƒD]\}}|jƒqNWt j +|jdƒ||<|r²y |j }Wnt k +r§q²X|ƒndS(Ni( R6R>RRRIR R4RDR-RKtdumpsR"R$(R)R"RRR RGRAR&((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR#ås  +  (R0R1R2R+R#(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyRH·s (tDircBseZddd„ZRS(cCsŠtj|ƒ|sdStj|ƒ|_t|jtƒsMi|_t‚n|r†x0|jjƒD]\}}|j ||ƒqcWndS(s8 fp - file pointer to read entries from N( -R3R+RKtloadR4RMRNRRDR.(R)tfpRRGRA((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+s   - N(R0R1tNoneR+(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyRTÿstDirFilecBs#eZdZd„Zdd„ZRS(sJ +R3R+RKtloadR4RMRNRRDR.(R)tfpRRGRA((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+s   N(R0R1tNoneR+(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyRTÿstDirFilecBs#eZdZd„Zdd„ZRS(sJ Encapsulates reading and writing a per-directory .sconsign file. - c -Cs½||_tii|idƒ|_yt|idƒ}Wntj -o d}nXyti |||ƒWn<t -j -o -‚n(t i i t i id|iƒnXti|ƒdS(s2 + cCs¹||_tjj|jdƒ|_yt|jdƒ}Wntk +rSd}nXytj |||ƒWn:t +k +r‚n't j j t j jd|jƒnXtj|ƒdS(s2 dir - the directory for the file s .sconsigntrbs#Ignoring corrupt .sconsign file: %sN(RR -R tjointsconsignRRRWRTR+RORRRRR R(R)RRV((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+s  icCsó|ipdS|iƒtii|iidtiƒƒ}yt|dƒ}|}WnItj -o=yt|i dƒ}|i }Wq£tj -odSXnXx'|i -i ƒD]\}}|i ƒq³Wt i|i -|dƒ|iƒ||i joÅy=ti|i ƒd}ti|i dƒti|i ƒWnttfj -onXyti||i ƒWqÂtj -oBt|i dƒit|dƒiƒƒti|i |ƒqÂXnyti|ƒWnttfj -onXdS(s) +R tjointsconsignRRRWRTR+RORRRRR R(R)RRV((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR+s   + icCså|js dS|jƒtjj|jjdtjƒƒ}yt|dƒ}|}WnEtk +rœyt|j dƒ}|j }Wqtk +r˜dSXnXx'|j +j ƒD]\}}|j ƒq­Wt j|j +|dƒ|jƒ||j kr¶y=tj|j ƒd}tj|j dƒtj|j ƒWnttfk +rLnXytj||j ƒWq¶tk +r²t|j dƒjt|dƒjƒƒtj|j |ƒq¶Xnytj|ƒWnttfk +rànXdS(s) Write the .sconsign file to disk. Try to write to a temporary file first, and rename it if we succeed. If we can't write to the temporary file, it's probably because the directory isn't writable (and if so, @@ -84,17 +80,14 @@ try to write directly to the .sconsign file as a backup. If we can't rename, try to copy the temporary contents back to the .sconsign file. Either way, always try to remove the temporary file at the end. Ns.scons%dtwbiii¶RY(R6R>R -R RZRtgetpidRRR[R4RDR-RKtdumptclosetstattchmodtunlinkRtrenameR#tread(R)R"ttemptfiletfnameRGRAR((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR#.sD - +R RZRtgetpidRRR[R4RDR-RKtdumptclosetstattchmodtunlinkRtrenameR#tread(R)R"ttemptfiletfnameRGRAR((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyR#.sB  % -    -((R0R1R2R+R#(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyRXs cCsD|djotadan$ta|a|dj o -|andS(sU +     + ((R0R1R2R+R#(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyRXs cCs@|dkrtadan!ta|a|dk r<|andS(sU Arrange for all signatures to be stored in a global .sconsign.db* file. N(RWRXt ForDirectoryRRHR (R/t -dbm_module((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytFilels  - (R2t __revision__t SCons.compatRR +dbm_module((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pytFilels   (R2t __revision__t SCons.compatRR RKt SCons.dblitetSCons.WarningsRtdblitetignore_corrupt_dbfilestcorruption_warningR RRR RRR!R RIR#tobjectR'R3RHRTRXRhRWRj(((s^/home/als/proj/qrscanner/ext/qrscanner/zxing/scons/scons-local-2.0.0.final.0/SCons/SConsign.pyt<module>s2             6HX \ No newline at end of file