fix: убрал несуществующий аргумент в on_directory_changed, добавил еще цветов (IndexError)

This commit is contained in:
Андрей Скирченко 2024-11-13 18:23:26 +03:00
parent f38ac86f4f
commit a94b5107c0
2 changed files with 11 additions and 3 deletions

View File

@ -251,7 +251,15 @@ colors = [
'#B565A7', # лавандовый
'#009B77', # глубокий бирюзовый
'#DD4124', # ярко-красный
'#45B8AC' # мягкий мятный
'#45B8AC', # мягкий мятный
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
"#00FF00",
]
RGBA = [(255, 255, 0),

View File

@ -32,7 +32,7 @@ class DirectoryWatcher(QObject):
self.watcher.directoryChanged.connect(self.on_directory_changed)
def on_directory_changed(self, _):
def on_directory_changed(self):
try:
current_files = set(os.listdir(self.directory_path))
new_files = current_files - self.existing_files
@ -99,7 +99,7 @@ class MainWindow(QMainWindow):
def main():
directory_to_watch = "trace_samples/"
directory_to_watch = "/home/andrei/Desktop/bla"
if not os.path.isdir(directory_to_watch):
print(f"Директория не найдена: {directory_to_watch}")