diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2016-03-28 10:41:07 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2016-03-28 10:41:07 +0200 |
commit | bfaf706d70c3c113b40ce1cbc4d11d73c7500d73 (patch) | |
tree | 922c34d4d764a534283e8ac4d585f253c82c57f9 /git/remote.py | |
parent | c4c6851c55757fb0bc9d77da97d7db9e7ae232d7 (diff) | |
download | gitpython-bfaf706d70c3c113b40ce1cbc4d11d73c7500d73.tar.gz |
fix(remote): asssertion message formatting
Related to #396
Diffstat (limited to 'git/remote.py')
-rw-r--r-- | git/remote.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git/remote.py b/git/remote.py index 759a3653..9848624b 100644 --- a/git/remote.py +++ b/git/remote.py @@ -607,11 +607,12 @@ class Remote(LazyMixin, Iterable): def _assert_refspec(self): """Turns out we can't deal with remotes if the refspec is missing""" config = self.config_reader + unset = 'placeholder' try: - if config.get_value('fetch', default=type) is type: + if config.get_value('fetch', default=unset) is unset: msg = "Remote '%s' has no refspec set.\n" msg += "You can set it as follows:" - msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % self.name + msg += " 'git config --add \"remote.%s.fetch +refs/heads/*:refs/heads/*\"'." % (self.name, self.name) raise AssertionError(msg) finally: config.release() |