Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
88d15d7e
Commit
88d15d7e
authored
Jun 28, 2013
by
Christos Stavrakakis
Browse files
Handle case of no user in config
parent
3c9b5ba0
Changes
1
Hide whitespace changes
Inline
Side-by-side
devflow/utils.py
View file @
88d15d7e
...
...
@@ -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"
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment