def _obtain_lock(id):
 try:
  os.symlink('/dev/null', _lock_file(id))
  return True
 except:
  return False

def _obtain_lock ( id ) : try : os . symlink ( '/dev/null' , _lock_file ( id ) ) return True except : return False
attempts to lock id .