From a3d27131e91c834d89d1d1450495f1f18b0227c0 Mon Sep 17 00:00:00 2001 From: Nicolargo Date: Wed, 23 Dec 2015 15:25:12 +0100 Subject: [PATCH] Some Pep and Flake improvment --- glances/__init__.py | 12 +++++++----- glances/plugins/glances_docker.py | 4 ++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/glances/__init__.py b/glances/__init__.py index 389c5875..b55b0200 100644 --- a/glances/__init__.py +++ b/glances/__init__.py @@ -16,19 +16,21 @@ # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . +# """Init the Glances software.""" -__appname__ = 'glances' -__version__ = '2.6beta' -__author__ = 'Nicolas Hennion ' -__license__ = 'LGPL' - import locale import platform import signal import sys +# Global name +__appname__ = 'glances' +__version__ = '2.6beta' +__author__ = 'Nicolas Hennion ' +__license__ = 'LGPL' + # Import psutil try: from psutil import __version__ as __psutil_version diff --git a/glances/plugins/glances_docker.py b/glances/plugins/glances_docker.py index 1ddb1dab..03ea079c 100644 --- a/glances/plugins/glances_docker.py +++ b/glances/plugins/glances_docker.py @@ -559,15 +559,19 @@ class ThreadDockerGrabber(threading.Thread): @property def stats(self): + """Stats getter""" return self._stats @stats.setter def stats(self, value): + """Stats setter""" self._stats = value def stop(self, timeout=None): + """Stop the thread""" logger.debug("docker plugin - Close thread for container {0}".format(self._container_id[:12])) self._stopper.set() def stopped(self): + """Return True is the thread is stopped""" return self._stopper.isSet()