fix: убрал несуществующий аргумент в on_directory_changed, добавил еще цветов (IndexError)
This commit is contained in:
parent
f38ac86f4f
commit
a94b5107c0
@ -251,7 +251,15 @@ colors = [
|
||||
'#B565A7', # лавандовый
|
||||
'#009B77', # глубокий бирюзовый
|
||||
'#DD4124', # ярко-красный
|
||||
'#45B8AC' # мягкий мятный
|
||||
'#45B8AC', # мягкий мятный
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
"#00FF00",
|
||||
]
|
||||
|
||||
RGBA = [(255, 255, 0),
|
||||
|
@ -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}")
|
||||
|
Loading…
Reference in New Issue
Block a user