Commit 88d15d7e authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Handle case of no user in config

parent 3c9b5ba0
......@@ -81,8 +81,12 @@ def get_vcs_info():
revno = len(list(repo.iter_commits()))
toplevel = repo.working_dir
config = repo.config_reader()
name = config.get_value("user", "name")
email = config.get_value("user", "email")
try:
name = config.get_value("user", "name")
email = config.get_value("user", "email")
except Exception as e:
raise ValueError("Can not read name/email from .gitconfig"
" file.: %s" % e)
info = namedtuple("vcs_info", ["branch", "revid", "revno",
"toplevel", "name", "email"])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment