Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
21c3784a
Commit
21c3784a
authored
Sep 28, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If submodules are not found, don't error out.
parent
952a3692
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lib/ansible/utils/__init__.py
+5
-3
No files found.
lib/ansible/utils/__init__.py
View file @
21c3784a
...
...
@@ -833,7 +833,7 @@ def default(value, function):
return
value
def
_git
repo
info
(
repo_path
):
def
_git
_repo_
info
(
repo_path
):
''' returns a string containing git branch, commit id and commit date '''
result
=
None
if
os
.
path
.
exists
(
repo_path
):
...
...
@@ -877,14 +877,16 @@ def _gitrepoinfo(repo_path):
def
_gitinfo
():
basedir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'..'
,
'..'
,
'..'
)
repo_path
=
os
.
path
.
join
(
basedir
,
'.git'
)
result
=
_git
repo
info
(
repo_path
)
result
=
_git
_repo_
info
(
repo_path
)
submodules
=
os
.
path
.
join
(
basedir
,
'.gitmodules'
)
if
not
os
.
path
.
exists
(
submodules
):
return
result
f
=
open
(
submodules
)
for
line
in
f
:
tokens
=
line
.
strip
()
.
split
(
' '
)
if
tokens
[
0
]
==
'path'
:
submodule_path
=
tokens
[
2
]
submodule_info
=
_git
repo
info
(
os
.
path
.
join
(
basedir
,
submodule_path
,
'.git'
))
submodule_info
=
_git
_repo_
info
(
os
.
path
.
join
(
basedir
,
submodule_path
,
'.git'
))
if
not
submodule_info
:
submodule_info
=
' not found - use git submodule update --init '
+
submodule_path
result
+=
"
\n
{0}: {1}"
.
format
(
submodule_path
,
submodule_info
)
...
...
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