Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
usr
/
lib64
/
python2.7
/
site-packages
/
Cheetah
/
Utils
/
File Content:
Misc.pyo
� �l�Rc @ sU d Z d d l Z d d l Z d � Z d d � Z d d � Z d � Z d � Z d S( sQ Miscellaneous functions/objects used by Cheetah but also useful standalone. i����Nc C s% t j j | d � t j d � d S( Ns i ( t syst stderrt writet exit( t reason( ( s8 /usr/lib64/python2.7/site-packages/Cheetah/Utils/Misc.pyt die s t c C s1 t | t � r- t | t � r- | | � � n | S( su Raise 'thing' if it's a subclass of Exception. Otherwise return it. Called by: Cheetah.Servlet.cgiImport() ( t isinstancet typet issubclasst Exception( t thingt errmsg( ( s8 /usr/lib64/python2.7/site-packages/Cheetah/Utils/Misc.pyt useOrRaise s t argumentc C s@ x9 | j � D]+ } | | k r t d | | f � � q q Wd S( s� Verify no illegal keyword arguments were passed to a function. in : dic, dictionary (**kw in the calling routine). legalKeywords, list of strings, the keywords that are allowed. what, string, suffix for error message (see function source). out: None. exc: TypeError if 'dic' contains a key not in 'legalKeywords'. called by: Cheetah.Template.__init__() s '%s' is not a valid %sN( t keyst TypeError( t dict legalKeywordst whatt k( ( s8 /usr/lib64/python2.7/site-packages/Cheetah/Utils/Misc.pyt checkKeywords s c G s: x3 | D]+ } y | j | � Wq t k r1 q Xq Wd S( s� Save as list_.remove(each element) but don't raise an error if element is missing. Modifies 'list_' in place! Returns None. N( t removet ValueError( t list_t elementst elm( ( s8 /usr/lib64/python2.7/site-packages/Cheetah/Utils/Misc.pyt removeFromList( s c C s� t j j | � \ } } | r>