From a8591a094a768d73e6efb5a698f74d354c989291 Mon Sep 17 00:00:00 2001 From: Andrew Rabert Date: Thu, 26 Jul 2018 20:25:46 -0400 Subject: Exclude kwarg when None --- git/cmd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/cmd.py') diff --git a/git/cmd.py b/git/cmd.py index 30028487..b6305176 100644 --- a/git/cmd.py +++ b/git/cmd.py @@ -885,7 +885,7 @@ class Git(LazyMixin): if len(name) == 1: if value is True: return ["-%s" % name] - elif type(value) is not bool: + elif value not in (False, None): if split_single_char_options: return ["-%s" % name, "%s" % value] else: @@ -893,7 +893,7 @@ class Git(LazyMixin): else: if value is True: return ["--%s" % dashify(name)] - elif type(value) is not bool: + elif value not in (False, None): return ["--%s=%s" % (dashify(name), value)] return [] -- cgit v1.2.1