Fixed some small mistakes in relation to handling of git-config settings.

This commit is contained in:
Adam Waldenberg 2013-07-10 03:32:29 +02:00
parent a05403df60
commit 109fefb978
2 changed files with 4 additions and 2 deletions

View File

@ -36,9 +36,9 @@ def __read_git_config__(run, variable, destination=None):
setting = setting.decode("utf-8", "replace").strip()
if setting == "True" or setting == "true" or setting == "t" or setting == "1":
run.opts[destination] = True
vars(run.opts)[destination] = True
elif setting == "False" or setting == "false" or setting == "f" or setting == "0":
run.opts[destination] = False
vars(run.opts)[destination] = False
return True
except IndexError:

View File

@ -145,6 +145,8 @@ def main():
#We need the repo above to be set before we read the git config.
config.init(__run__)
parser.parse_args(values=opts)
except (format.InvalidFormatError, optval.InvalidOptionArgument, optval.OptionParsingError) as msg:
print(sys.argv[0], "\b:", end=" ")
print(msg)