original_docstring: 
          Releases lock identified by key.
          Raises NotFound if lock does not exist.
          
docstring: Releases lock identified by key.
  Raises NotFound if lock does not exist.
docstring_tokens: Releases lock identified by key . Raises NotFound if lock does not exist .
code: def release_lock(self, key, lock_holder=None):
          """
          Releases lock identified by key.
          Raises NotFound if lock does not exist.
          """
          if not key:
              raise BadRequest("Missing argument: key")
          if "/" in key:
              raise BadRequest("Invalid argument value: key")
  
          log.debug("Directory.release_lock(%s)", key)
  
          dir_entry = self.lookup(LOCK_DIR_PATH, key, return_entry=True)
          if dir_entry:
              if lock_holder and dir_entry.attributes[LOCK_HOLDER_ATTR] != lock_holder:
                  raise BadRequest("Cannot release lock - not currently lock holder")
              self._delete_lock(dir_entry)
          else:
              raise NotFound("Lock %s not found" % key)
code_tokens: def release_lock ( self , key , lock_holder = None ) : if not key : raise BadRequest ( "Missing argument: key" ) if "/" in key : raise BadRequest ( "Invalid argument value: key" ) log . debug ( "Directory.release_lock(%s)" , key ) dir_entry = self . lookup ( LOCK_DIR_PATH , key , return_entry = True ) if dir_entry : if lock_holder and dir_entry . attributes [ LOCK_HOLDER_ATTR ] != lock_holder : raise BadRequest ( "Cannot release lock - not currently lock holder" ) self . _delete_lock ( dir_entry ) else : raise NotFound ( "Lock %s not found" % key )
short_docstring: Releases lock identified by key.
short_docstring_tokens: Releases lock identified by key .
comment: """
          Releases lock identified by key.
          Raises NotFound if lock does not exist.
          """