/usr/lib/python3.9/site-packages/glances/__pycache__
a ���cx � @ s� d Z ddlmZ ddlZddlmZ ddlmZmZ ddl m Z dZzddlmZ W n: e y� zddlmZ W n e y� d ZY n0 Y n0 G d d� de�ZdS )zManage the folder list.� )�unicode_literalsN)�Timer)�range� nativestr)�loggerT)�scandirFc @ s� e Zd ZdZdZg ZdZdd� Zdd� Zdd � Z d d� Z dd � Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&S )'� FolderLista� This class describes the optional monitored folder list. The folder list is a list of 'important' folder to monitor. The list (Python list) is composed of items (Python dict). An item is defined (dict keys): * path: Path to the folder * careful: optional careful threshold (in MB) * warning: optional warning threshold (in MB) * critical: optional critical threshold (in MB) � � c C sX || _ g | _d| _| j durN| j �d�rNtrBt�d� | �d� qTt�d� ng | _ dS )z?Init the folder list from the configuration file, if it exists.TNZfoldersz"Folder list configuration detectedzDScandir not found. Please use Python 3.5+ or install the scandir lib) �config� timer_folders� first_grabZhas_section�scandir_tagr �debug�_FolderList__set_folder_list�error�_FolderList__folder_list)�selfr � r �7/usr/lib/python3.9/site-packages/glances/folder_list.py�__init__6 s zFolderList.__init__c C sD t d| jd �D �],}i }dt|� d }t|�|d<