<s> try : <EOL> import os <EOL> import os . path <EOL> import atexit <EOL> import time <EOL> import errno <EOL> import configuration <EOL> if configuration . debug . COVERAGE_DIR : <EOL> import coverage <EOL> def import_critic ( ) : <EOL> import critic <EOL> coverage . call ( "<STR_LIT>" , import_critic ) <EOL> else : <EOL> import critic <EOL> pidfile_path = os . path . join ( configuration . paths . WSGI_PIDFILE_DIR , str ( os . getpid ( ) ) ) <EOL> def deletePidFile ( ) : <EOL> try : os . unlink ( pidfile_path ) <EOL> except : pass <EOL> try : os . makedirs ( os . path . dirname ( pidfile_path ) ) <EOL> except OSError as error : <EOL> if error . errno == errno . EEXIST : pass <EOL> else : raise <EOL> open ( pidfile_path , "<STR_LIT:w>" ) . write ( str ( time . time ( ) ) ) <EOL> atexit . register ( deletePidFile ) <EOL> except : pass </s>
