File: //lib/python3.6/site-packages/glances/plugins/__pycache__/glances_raid.cpython-36.opt-1.pyc
3
Eo�c� � @ s� d Z ddlmZ ddlmZ ddlmZ yddlmZ W n6 e k
rn Z
zdZejdj
e
�� W Y ddZ
[
X nX d ZG d
d� de�ZdS )zRAID plugin.� )�iterkeys)�logger)�
GlancesPlugin)�MdStatTz0Missing Python Lib ({}), Raid plugin is disabledNFc sH e Zd ZdZd� fdd� Zejejdd� ��Zddd�Z d d
� Z
� ZS )
�PluginzKGlances RAID plugin.
stats is a dict (see pymdstat documentation)
Nc s t t| �j||d� d| _dS )zInit the plugin.)�args�configTN)�superr �__init__Z
display_curse)�selfr r )� __class__� �"/usr/lib/python3.6/glances_raid.pyr
s zPlugin.__init__c C s| | j � }tr| jS | jdkrfyt� }|j� d }W qp tk
rb } ztjd| � | jS d}~X qpX n
| jdkrp|| _| jS )z)Update RAID stats using the input method.Zlocal�arrayszCan not grab RAID stats (%s)NZsnmp) Zget_init_value�import_error_tag�statsZinput_methodr Z get_stats� Exceptionr �debug)r r Zmds�er
r
r �update'