#NEWLINE# def stop( self ) : #NEWLINE# #INDENT# "\n        Kill running daemon\n\n        Use sys.exit() here instead of self._shutdown(), because\n        it's executed from separate process\n        " #NEWLINE# if ( not os . path . isfile ( self . conf [ 'pidfile' ] ) ) : #NEWLINE# #INDENT# lg . error ( "PID file doesn't exist! Daemon not running?" ) #NEWLINE# sys . exit ( 1 ) #NEWLINE# #UNINDENT# fp = open ( fp . conf [ 'pidfile' ] , 'r' ) #NEWLINE# pid = fp . read ( ) #NEWLINE# fp . close ( ) #NEWLINE# lg . info ( ( 'Killing process %s' % pid ) ) #NEWLINE# os . kill ( int ( pid ) , signal . SIGTERM )