Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork939
Closed
Description
According to its documentation,Repo.remote()
is supposed to raise aValueError
is the specified remote name does not match an existing remote on the repository.
However, from the code it seems that its not the case:
def remote(self, name='origin'): """:return: Remote with the specified name :raise ValueError: if no remote with such a name exists""" return Remote(self, name)
See the__init__
implementation forRemote
:
class Remote(LazyMixin, Iterable): def __init__(self, repo, name): self.repo = repo self.name = name if os.name == 'nt': dir(self)
The actual code just create aRemote
instance which fails later on whenever one of its method is called.
This is likely not the expected behavior and I would assume the documation to be more sensible that the current implementation.