def isLocked(name):
 l = FilesystemLock(name)
 result = None
 try:
  result = l.lock()
 finally:
  if result:
   l.unlock()
 return (not result)

def isLocked ( name ) : l = FilesystemLock ( name ) result = None try : result = l . lock ( ) finally : if result : l . unlock ( ) return ( not result )
determine if the lock of the given name is held or not .