Some Pep and Flake improvment

This commit is contained in:
Nicolargo 2015-12-23 15:25:12 +01:00
parent 3f253c7ef8
commit a3d27131e9
2 changed files with 11 additions and 5 deletions

View File

@ -16,19 +16,21 @@
#
# 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/>.
#
"""Init the Glances software."""
__appname__ = 'glances'
__version__ = '2.6beta'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPL'
import locale
import platform
import signal
import sys
# Global name
__appname__ = 'glances'
__version__ = '2.6beta'
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
__license__ = 'LGPL'
# Import psutil
try:
from psutil import __version__ as __psutil_version

View File

@ -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()