mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-28 22:55:55 +03:00
Some Pep and Flake improvment
This commit is contained in:
parent
3f253c7ef8
commit
a3d27131e9
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user