mirror of https://github.com/nicolargo/glances
Some Pep and Flake improvment
parent
3f253c7ef8
commit
a3d27131e9
|
@ -16,19 +16,21 @@
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
"""Init the Glances software."""
|
"""Init the Glances software."""
|
||||||
|
|
||||||
__appname__ = 'glances'
|
|
||||||
__version__ = '2.6beta'
|
|
||||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
|
||||||
__license__ = 'LGPL'
|
|
||||||
|
|
||||||
import locale
|
import locale
|
||||||
import platform
|
import platform
|
||||||
import signal
|
import signal
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# Global name
|
||||||
|
__appname__ = 'glances'
|
||||||
|
__version__ = '2.6beta'
|
||||||
|
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||||
|
__license__ = 'LGPL'
|
||||||
|
|
||||||
# Import psutil
|
# Import psutil
|
||||||
try:
|
try:
|
||||||
from psutil import __version__ as __psutil_version
|
from psutil import __version__ as __psutil_version
|
||||||
|
|
|
@ -559,15 +559,19 @@ class ThreadDockerGrabber(threading.Thread):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def stats(self):
|
def stats(self):
|
||||||
|
"""Stats getter"""
|
||||||
return self._stats
|
return self._stats
|
||||||
|
|
||||||
@stats.setter
|
@stats.setter
|
||||||
def stats(self, value):
|
def stats(self, value):
|
||||||
|
"""Stats setter"""
|
||||||
self._stats = value
|
self._stats = value
|
||||||
|
|
||||||
def stop(self, timeout=None):
|
def stop(self, timeout=None):
|
||||||
|
"""Stop the thread"""
|
||||||
logger.debug("docker plugin - Close thread for container {0}".format(self._container_id[:12]))
|
logger.debug("docker plugin - Close thread for container {0}".format(self._container_id[:12]))
|
||||||
self._stopper.set()
|
self._stopper.set()
|
||||||
|
|
||||||
def stopped(self):
|
def stopped(self):
|
||||||
|
"""Return True is the thread is stopped"""
|
||||||
return self._stopper.isSet()
|
return self._stopper.isSet()
|
||||||
|
|
Loading…
Reference in New Issue