|
 |
005523 |
--- oslosphinx-4.18.0/oslosphinx/__init__.py~ 2018-01-08 15:12:16.000000000 +0100
|
|
 |
005523 |
+++ oslosphinx-4.18.0/oslosphinx/__init__.py 2019-08-04 12:04:46.928166116 +0200
|
|
 |
005523 |
@@ -18,7 +18,8 @@
|
|
 |
005523 |
from six.moves.urllib import parse
|
|
 |
005523 |
import string
|
|
 |
005523 |
import subprocess
|
|
 |
005523 |
-
|
|
 |
005523 |
+from sphinx.util import logging
|
|
 |
005523 |
+LOG = logging.getLogger(__name__)
|
|
 |
005523 |
|
|
 |
005523 |
CGIT_BASE = 'http://git.openstack.org/cgit/'
|
|
 |
005523 |
|
|
 |
005523 |
@@ -57,7 +58,7 @@
|
|
 |
005523 |
git_cmd, stdout=subprocess.PIPE).communicate()[0]
|
|
 |
005523 |
raw_version_list = raw_version_list.decode("utf8")
|
|
 |
005523 |
except OSError:
|
|
 |
005523 |
- app.warn('Cannot get tags from git repository. '
|
|
 |
005523 |
+ LOG.warn('Cannot get tags from git repository. '
|
|
 |
005523 |
'Not setting "other_versions".')
|
|
 |
005523 |
raw_version_list = u''
|
|
 |
005523 |
|
|
 |
005523 |
@@ -73,7 +74,7 @@
|
|
 |
005523 |
|
|
 |
005523 |
def builder_inited(app):
|
|
 |
005523 |
theme_dir = os.path.join(os.path.dirname(__file__), 'theme')
|
|
 |
005523 |
- app.info('Using openstack theme from %s' % theme_dir)
|
|
 |
005523 |
+ LOG.info('Using openstack theme from %s' % theme_dir)
|
|
 |
005523 |
# Insert our theme directory at the front of the search path and
|
|
 |
005523 |
# force the theme setting to use the one in the package unless
|
|
 |
005523 |
# another openstack theme is already selected. This is done here,
|
|
 |
005523 |
--- oslosphinx-4.18.0/oslosphinx/check_blueprints.py~ 2018-01-08 15:12:16.000000000 +0100
|
|
 |
005523 |
+++ oslosphinx-4.18.0/oslosphinx/check_blueprints.py 2019-08-04 12:04:23.136895987 +0200
|
|
 |
005523 |
@@ -15,7 +15,8 @@
|
|
 |
005523 |
"""
|
|
 |
005523 |
|
|
 |
005523 |
import requests
|
|
 |
005523 |
-
|
|
 |
005523 |
+from sphinx.util import logging
|
|
 |
005523 |
+LOG = logging.getLogger(__name__)
|
|
 |
005523 |
|
|
 |
005523 |
class BlueprintChecker(object):
|
|
 |
005523 |
|
|
 |
005523 |
@@ -74,11 +75,11 @@
|
|
 |
005523 |
|
|
 |
005523 |
def blueprint_exists(self, project_name, bp_name):
|
|
 |
005523 |
"""Return boolean indicating whether the blueprint exists."""
|
|
 |
005523 |
- self.app.info('Checking for %s in %s' % (bp_name, project_name))
|
|
 |
005523 |
+ LOG.info('Checking for %s in %s' % (bp_name, project_name))
|
|
 |
005523 |
url = self.BP_URL_TEMPLATE % (project_name, bp_name)
|
|
 |
005523 |
response = requests.get(url)
|
|
 |
005523 |
if response.status_code == 200:
|
|
 |
005523 |
- self.app.info('Found %s in %s' % (bp_name, project_name))
|
|
 |
005523 |
+ LOG.info('Found %s in %s' % (bp_name, project_name))
|
|
 |
005523 |
return True
|
|
 |
005523 |
return False
|
|
 |
005523 |
|
|
 |
005523 |
@@ -87,7 +88,7 @@
|
|
 |
005523 |
if bp_name in self._good_bps:
|
|
 |
005523 |
return True
|
|
 |
005523 |
self._load_project_settings()
|
|
 |
005523 |
- self.app.info('') # emit newline
|
|
 |
005523 |
+ LOG.info('') # emit newline
|
|
 |
005523 |
candidate_project, dash, bp_name_to_find = bp_name.partition('-')
|
|
 |
005523 |
if candidate_project in self.project_names:
|
|
 |
005523 |
# First check the shortened name of the blueprint in the project.
|
|
 |
005523 |
@@ -96,13 +97,13 @@
|
|
 |
005523 |
# Then check the full name of the blueprint in the project.
|
|
 |
005523 |
if self.blueprint_exists(candidate_project, bp_name):
|
|
 |
005523 |
return
|
|
 |
005523 |
- self.app.info(
|
|
 |
005523 |
+ LOG.info(
|
|
 |
005523 |
('Blueprint name %r looks like it starts with a project '
|
|
 |
005523 |
'name, but %r was not found in project %r') %
|
|
 |
005523 |
(bp_name, bp_name_to_find, candidate_project)
|
|
 |
005523 |
)
|
|
 |
005523 |
else:
|
|
 |
005523 |
- self.app.info(
|
|
 |
005523 |
+ LOG.info(
|
|
 |
005523 |
'Blueprint checking is faster if the file names '
|
|
 |
005523 |
'start with the launchpad project name.'
|
|
 |
005523 |
)
|
|
 |
005523 |
@@ -111,7 +112,7 @@
|
|
 |
005523 |
self._good_bps.add(bp_name)
|
|
 |
005523 |
break
|
|
 |
005523 |
else:
|
|
 |
005523 |
- self.app.warn(
|
|
 |
005523 |
+ LOG.warn(
|
|
 |
005523 |
'Could not find a blueprint called %r in %s'
|
|
 |
005523 |
% (bp_name, self._warn_search),
|
|
 |
005523 |
location=(bp_name, 0),
|
|
 |
005523 |
@@ -122,7 +123,7 @@
|
|
 |
005523 |
|
|
 |
005523 |
|
|
 |
005523 |
def setup(app):
|
|
 |
005523 |
- app.info('Initializing %s' % __name__)
|
|
 |
005523 |
+ LOG.info('Initializing %s' % __name__)
|
|
 |
005523 |
checker = BlueprintChecker(app)
|
|
 |
005523 |
app.connect('doctree-resolved', checker.doctree_resolved)
|
|
 |
005523 |
app.add_config_value('check_blueprints_project_group', 'openstack', 'env')
|