original_docstring: This method blocks until it obtained the lock, or raises IOError if 
  		it ran out of time or if the parent directory was not available anymore.
  		If this method returns, you are guranteed to own the lock
docstring: This method blocks until it obtained the lock, or raises IOError if
  it ran out of time or if the parent directory was not available anymore.
  If this method returns, you are guranteed to own the lock
docstring_tokens: This method blocks until it obtained the lock or raises IOError if it ran out of time or if the parent directory was not available anymore . If this method returns you are guranteed to own the lock
code: def _obtain_lock(self):
  		"""This method blocks until it obtained the lock, or raises IOError if 
  		it ran out of time or if the parent directory was not available anymore.
  		If this method returns, you are guranteed to own the lock"""
  		starttime = time.time()
  		maxtime = starttime + float(self._max_block_time)
  		while True:
  			try:
  				super(BlockingLockFile, self)._obtain_lock()
  			except IOError:
  				# synity check: if the directory leading to the lockfile is not
  				# readable anymore, raise an execption
  				curtime = time.time()
  				if not os.path.isdir(os.path.dirname(self._lock_file_path())):
  					msg = "Directory containing the lockfile %r was not readable anymore after waiting %g seconds" % (self._lock_file_path(), curtime - starttime)
  					raise IOError(msg)
  				# END handle missing directory
  				
  				if curtime >= maxtime:
  					msg = "Waited %g seconds for lock at %r" % ( maxtime - starttime, self._lock_file_path())
  					raise IOError(msg)
  				# END abort if we wait too long
  				time.sleep(self._check_interval)
  			else:
  				break
  		# END endless loop
code_tokens: def _obtain_lock ( self ) : starttime = time . time ( ) maxtime = starttime + float ( self . _max_block_time ) while True : try : super ( BlockingLockFile , self ) . _obtain_lock ( ) except IOError : curtime = time . time ( ) if not os . path . isdir ( os . path . dirname ( self . _lock_file_path ( ) ) ) : msg = "Directory containing the lockfile %r was not readable anymore after waiting %g seconds" % ( self . _lock_file_path ( ) , curtime - starttime ) raise IOError ( msg ) if curtime >= maxtime : msg = "Waited %g seconds for lock at %r" % ( maxtime - starttime , self . _lock_file_path ( ) ) raise IOError ( msg ) time . sleep ( self . _check_interval ) else : break
short_docstring: This method blocks until it obtained the lock, or raises IOError if
  it ran out of time or if the parent directory was not available anymore.
short_docstring_tokens: This method blocks until it obtained the lock or raises IOError if it ran out of time or if the parent directory was not available anymore .
comment: """This method blocks until it obtained the lock, or raises IOError if 
  		it ran out of time or if the parent directory was not available anymore.
  		If this method returns, you are guranteed to own the lock"""$SEP$# synity check: if the directory leading to the lockfile is not$SEP$# readable anymore, raise an execption$SEP$# END handle missing directory$SEP$# END abort if we wait too long$SEP$# END endless loop