Merge "allow building docs without ceilometer client"

This commit is contained in:
Zuul 2019-05-14 02:38:42 +00:00 committed by Gerrit Code Review
commit 9922dec025

View File

@ -18,7 +18,6 @@
import datetime import datetime
from ceilometerclient import exc
from oslo_log import log from oslo_log import log
from oslo_utils import timeutils from oslo_utils import timeutils
@ -31,6 +30,13 @@ from watcher.datasources import base
LOG = log.getLogger(__name__) LOG = log.getLogger(__name__)
try:
from ceilometerclient import exc
HAS_CEILCLIENT = True
except ImportError:
HAS_CEILCLIENT = False
class CeilometerHelper(base.DataSourceBase): class CeilometerHelper(base.DataSourceBase):
NAME = 'ceilometer' NAME = 'ceilometer'