Nir Soffer has posted comments on this change.
Change subject: Add hawkular reporter to reports
......................................................................
Patch Set 7:
(2 comments)
https://gerrit.ovirt.org/#/c/58660/7/lib/vdsm/reports/hawkular.py
File lib/vdsm/reports/hawkular.py:
Line 19: #
Line 20:
Line 21: from __future__ import absolute_import
Line 22:
Line 23: from collections import deque
Please import collections, there is no need to import the name deque. This makes imports
easier to manage.
Line 24: import logging
Line 25: import threading
Line 26:
Line 27: import six
Line 39: def start(address):
Line 40: global _running
Line 41: if _running:
Line 42: raise RuntimeError('trying to start reporter while running')
Line 43: else:
else is not needed. The whole point in the early return style is to keep the normal flow
simple, avoiding unneeded indentation.
if-else is god when we want to handle two cases. Here we handle only one case, error, by
raising.
Line 44: logging.info("Starting hawkular reporter")
Line 45: concurrent.thread(_run, name='hawkular',
address=address).start()
Line 46: _running = True
Line 47:
--
To view, visit
https://gerrit.ovirt.org/58660
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I71f538184855f7c58bba66acd7b6dea3a53db71b
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: Yaniv Kaul <ykaul(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
Gerrit-HasComments: Yes