From 624c7eaf776013871166b7a505f131dad9ec1b83 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 1 Sep 2020 17:21:12 +0200 Subject: [PATCH] Move import to top of file --- src/yunohost/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 6605d97f6..3b0ad8c08 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -29,6 +29,7 @@ import re import yaml import collections import glob +import psutil from datetime import datetime from logging import FileHandler, getLogger, Formatter @@ -408,7 +409,6 @@ class OperationLogger(object): recent_operation_logs = sorted(glob.iglob("/var/log/yunohost/categories/operation/*.log"), key=os.path.getctime, reverse=True)[:20] - import psutil proc = psutil.Process().parent() while proc is not None: # We use proc.open_files() to list files opened / actively used by this proc