diff --git a/sohstationviewer/view/main_window.py b/sohstationviewer/view/main_window.py index 6ee524b28dfc9e32efadd40af329168189c41a8e..63239d441f480ca4f1e0fcc1ec3c3cad65c22da2 100755 --- a/sohstationviewer/view/main_window.py +++ b/sohstationviewer/view/main_window.py @@ -1144,8 +1144,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): self.current_directory_changed.emit(path) self.current_dir = path self.save_plot_dir = path - execute_db(f'UPDATE PersistentData SET FieldValue="{path}" WHERE ' - 'FieldName="currentDirectory"') + execute_db(f"UPDATE PersistentData SET FieldValue='{path}' WHERE " + "FieldName='currentDirectory'") self.set_open_files_list_texts() def set_open_files_list_texts(self): @@ -1211,8 +1211,8 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): Set current directory with info saved in DB """ rows = execute_db_dict( - 'SELECT FieldName, FieldValue FROM PersistentData ' - 'WHERE FieldName="currentDirectory"') + "SELECT FieldName, FieldValue FROM PersistentData " + "WHERE FieldName='currentDirectory'") if len(rows) > 0 and rows[0]['FieldValue']: self.set_current_directory(rows[0]['FieldValue']) @@ -1302,14 +1302,14 @@ class MainWindow(QtWidgets.QMainWindow, UIMainWindow): SOHView wasn't closed correctly. """ rows = execute_db( - 'SELECT FieldValue FROM PersistentData ' - 'WHERE FieldName="tempDataDirectory"') + "SELECT FieldValue FROM PersistentData " + "WHERE FieldName='tempDataDirectory'") temp_data_folder = rows[0][0] try: shutil.rmtree(temp_data_folder) execute_db( - f'UPDATE PersistentData SET FieldValue="{None}" WHERE' - f' FieldName="tempDataDirectory"' + f"UPDATE PersistentData SET FieldValue='{None}' WHERE" + f" FieldName='tempDataDirectory'" ) except (FileNotFoundError, TypeError): pass