doc: Log warning when can't get informaiton from git
Add warning to indicate something is wrong when getting last updated information from git repository. Change-Id: Ie1ff9d77c30e4d5601443ece992968593fc1b8c1
This commit is contained in:
parent
8be653361f
commit
5b3086eef5
|
@ -16,6 +16,7 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
import warnings
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
@ -137,6 +138,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()
|
||||||
|
|
||||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||||
|
|
Loading…
Reference in New Issue