Repository URL to install this package:
|
Version:
2.5 ▾
|
ó
ōEYc @ s@ d d l Z d d l Z e j e Z e d Z d Z d S( iÿÿÿÿNc C sµ | r t | | n t } t j j | } | j | i } | s_ | | j d d k r§ t j d | t | } | j
| d <Wd QX| | d <t } n | | d f S( s Read from a file if it has been modified.
:param cache: dictionary to hold opaque cache.
:param filename: the file path to read.
:param force_reload: Whether to reload the file.
:returns: A tuple with a boolean specifying if the data is fresh
or not.
t mtimei s Reloading cached file %st dataN( t delete_cached_filet Falset ost patht getmtimet
setdefaultt gett LOGt debugt opent readt True( t cachet filenamet force_reloadt reloadedR t
cache_infot fap( ( sO /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_policy/_cache_handler.pyt read_cached_file s
c C s# y | | =Wn t k
r n Xd S( s Delete cached file if present.
:param cache: dictionary to hold opaque cache.
:param filename: filename to delete
N( t KeyError( R R ( ( sO /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_policy/_cache_handler.pyR 0 s
( t loggingR t getLoggert __name__R R R R ( ( ( sO /home/tvault/.virtenv/lib/python2.7/site-packages/oslo_policy/_cache_handler.pyt <module> s