doc:Log warning when can't get information from git
This is follow up of commit a1a1c89c0d
,
add warning to indicate something is wrong when getting last updated
information from git repository.
Related-Bug: #1552251
Change-Id: I1ba2d4fe1fb3909742bd1a2f552e917effb35faa
This commit is contained in:
parent
3976e7e4c5
commit
0d10f6b1fe
|
@ -4,6 +4,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import warnings
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../..'))
|
sys.path.insert(0, os.path.abspath('../..'))
|
||||||
# -- General configuration ----------------------------------------------------
|
# -- General configuration ----------------------------------------------------
|
||||||
|
@ -64,6 +65,8 @@ try:
|
||||||
html_last_updated_fmt = subprocess.Popen(
|
html_last_updated_fmt = subprocess.Popen(
|
||||||
git_cmd, stdout=subprocess.PIPE).communicate()[0]
|
git_cmd, stdout=subprocess.PIPE).communicate()[0]
|
||||||
except Exception:
|
except Exception:
|
||||||
|
warnings.warn('Cannot get last updated time from git repository, '
|
||||||
|
'using current time.')
|
||||||
html_last_updated_fmt = time.ctime()
|
html_last_updated_fmt = time.ctime()
|
||||||
|
|
||||||
# Grouping the document tree into LaTeX files. List of tuples
|
# Grouping the document tree into LaTeX files. List of tuples
|
||||||
|
|
Loading…
Reference in New Issue