#NEWLINE# def get_lock_pid( self ) : #NEWLINE# #INDENT# 'Returns the PID that is stored in the lock directory, or\n        None if there is no such file.\n        ' #NEWLINE# filename = self . pidfile_name #NEWLINE# if ( not os . path . exists ( filename ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# pidfile = open ( self ) #NEWLINE# try : #NEWLINE# #INDENT# pid = pidfile . read ( ) #NEWLINE# if pid : #NEWLINE# #INDENT# return int ( pid ) #NEWLINE# #UNINDENT# #UNINDENT# finally : #NEWLINE# #INDENT# pidfile . close ( ) #NEWLINE# #UNINDENT# return None