From 4fa13d329591d355e2746f2fa011da06de150ade Mon Sep 17 00:00:00 2001 From: donoban Date: Sat, 5 Dec 2020 12:41:20 +0100 Subject: [PATCH] Pylint fixes --- qubesmanager/log_dialog.py | 10 ++++++---- qubesmanager/qube_manager.py | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/qubesmanager/log_dialog.py b/qubesmanager/log_dialog.py index f173d70..9b770df 100644 --- a/qubesmanager/log_dialog.py +++ b/qubesmanager/log_dialog.py @@ -34,11 +34,12 @@ LOG_DISPLAY_SIZE = 1024*1024 class LogDialog(ui_logdlg.Ui_LogDialog, QtWidgets.QDialog): # pylint: disable=too-few-public-methods - def __init__(self, app, log_path, parent=None): + def __init__(self, app, logfiles, parent=None): super().__init__(parent) self.app = app - self.logfiles = log_path + self.logfiles = logfiles + self.displayed_text = "" self.setupUi(self) @@ -56,7 +57,8 @@ class LogDialog(ui_logdlg.Ui_LogDialog, QtWidgets.QDialog): if os.path.exists(log_path): button = QtWidgets.QPushButton(log_path) button.clicked.connect(partial(self.set_current_log, log_path)) - self.buttonsLayout.addWidget(button, count / butts_in_row, count % butts_in_row) + self.buttonsLayout.addWidget(button, + count / butts_in_row, count % butts_in_row) count += 1 if count == 0: @@ -72,8 +74,8 @@ class LogDialog(ui_logdlg.Ui_LogDialog, QtWidgets.QDialog): clipboard.copy_text_to_qubes_clipboard(self.displayed_text) def set_current_log(self, log_path): - self.setWindowTitle(log_path) self.displayed_text = "" + self.setWindowTitle(log_path) log = open(log_path) log.seek(0, os.SEEK_END) if log.tell() > LOG_DISPLAY_SIZE: diff --git a/qubesmanager/qube_manager.py b/qubesmanager/qube_manager.py index d2a8312..2515529 100644 --- a/qubesmanager/qube_manager.py +++ b/qubesmanager/qube_manager.py @@ -21,8 +21,6 @@ # with this program; if not, see . # # -import os -import os.path import subprocess from datetime import datetime, timedelta from functools import partial