From bfaf706d70c3c113b40ce1cbc4d11d73c7500d73 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 28 Mar 2016 10:41:07 +0200 Subject: fix(remote): asssertion message formatting Related to #396 --- git/remote.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'git/remote.py') 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() -- cgit v1.2.1