def __init__(self, repo_url, repo_path): try: Repo.__init__(self, repo_path) except NoSuchPathError: Repo.clone_from(repo_url, repo_path) Repo.__init__(self, repo_path)