(self, path)
Find the closest v8 root to `path`.
Find the closest v8 root to `path`.
Find the closest v8 root to path .
def _find_work_dir(self, path):
    """Find the closest v8 root to `path`."""
    if os.path.exists(os.path.join(path, 'tools', 'dev', 'v8gen.py')):
      # Approximate the v8 root dir by a folder where this script exists
      # in the expected place.
      return path
    elif os.path.dirname(path) == path:
      raise Exception(
          'This appears to not be called from a recent v8 checkout')
    else:
      return self._find_work_dir(os.path.dirname(path))
def _find_work_dir ( self , path ) : if os . path . exists ( os . path . join ( path , 'tools' , 'dev' , 'v8gen.py' ) ) : # Approximate the v8 root dir by a folder where this script exists # in the expected place. return path elif os . path . dirname ( path ) == path : raise Exception ( 'This appears to not be called from a recent v8 checkout' ) else : return self . _find_work_dir ( os . path . dirname ( path ) )