mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #51169 from twangboy/fix_git_state
More descriptive error when missing GitPython or PyGit2
This commit is contained in:
commit
8920a86f2c
1 changed files with 6 additions and 0 deletions
|
@ -749,6 +749,12 @@ def latest(name,
|
|||
ret,
|
||||
'Failed to check remote refs: {0}'.format(_strip_exc(exc))
|
||||
)
|
||||
except NameError as exc:
|
||||
if 'global name' in exc.message:
|
||||
raise CommandExecutionError(
|
||||
'Failed to check remote refs: You may need to install '
|
||||
'GitPython or PyGit2')
|
||||
raise
|
||||
|
||||
if 'HEAD' in all_remote_refs:
|
||||
head_rev = all_remote_refs['HEAD']
|
||||
|
|
Loading…
Add table
Reference in a new issue