|
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 : /usr/lib64/python2.4/site-packages/ |
Upload File : |
mò äûEc @ s\ d k Z d k Z d k Z d k Z d k Z d „ Z d „ Z d e i f d „ ƒ YZ d S( Nc C s‡ g } t i d t i | ƒ ƒ } xT t i | ƒ D]C } | i | ƒ } | o' | i t i | i d ƒ d ƒ ƒ q2 q2 W| i ƒ | S( s¤ Utility function. We build a list of the versions available of a given template file in a cache directory. the files will resemble /cache_dir/version.template s (\d+)\.cache.i N( t version_listt ret compilet escapet templatet cache_matcht ost listdirt cache_dirt filet matcht appendt stringt atoit groupst sort( R R R R R R ( ( t3 /usr/lib64/python2.4/site-packages/CacheBlackBox.pyt VersionList s + c C s t | ƒ S( sÜ getBox: get a BlackBox from this module @box_cfg: a box_cfg conformant AdmList element containing the following elements: path: type string, the path to the context file (required) returns: CacheBlackBox object N( t CacheBlackBoxt box_cfg( R ( ( R t getBox s R c B sD t Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( s[ The CacheBlackBox class provides a class to read and write Contexts from and to files. c C s d | _ | i i | _ d | _ d | _ d | _ t i | ƒ y | i d ƒ i ƒ | _ Wn t d ‚ n Xy | i d ƒ i ƒ | _ Wn t d ‚ n Xy | i d ƒ i ƒ | _ Wn t d ‚ n Xy | i d ƒ i ƒ | _ Wn t d ‚ n Xd S( sÛ __init__: Initialize a BlackBox @self: the class instance @box_cfg: a box_cfg conformant AdmList element containing the following elements: cache_dir : a string template : a string mode : an integer i i R s6 CacheBlackBox box_cfg must contain a 'cache_dir' entryR s5 CacheBlackBox box_cfg must contain a 'template' entryt modes1 CacheBlackBox box_cfg must contain a 'mode' entryt depths2 CacheBlackBox box_cfg must contain a 'dapth' entryN( t selft statust __class__t __module__t met _errNot Nonet _errStrt writablet Alchemistt validateBoxCfgR t getChildByNamet getValueR t ValueErrorR R R ( R R ( ( R t __init__( s. c C s4 t | i | i ƒ } t | ƒ d j o d Sn d S( sa isReadable: if a read were attempted now, would it succede? @self: this BlackBox instance i i N( R R R R t vlistt len( R R&