Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kohya_gui/common_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ def validate_toml_file(file_path: str) -> bool:

try:
toml.load(file_path)
except:
except Exception:
log.error(f"{msg} FAILED: is not a valid toml file.")
return False
log.info(f"{msg} SUCCESS")
Expand Down
2 changes: 1 addition & 1 deletion kohya_gui/custom_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setup_logging(clean=False, debug=False):
if clean and os.path.isfile("setup.log"):
os.remove("setup.log")
time.sleep(0.1) # prevent race condition
except:
except Exception:
pass

if sys.version_info >= (3, 9):
Expand Down
2 changes: 1 addition & 1 deletion kohya_gui/manual_caption_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_tag_checkbox_updates(caption, quick_tags, quick_tags_set):
def paginate_go(page, max_page):
try:
page = float(page)
except:
except Exception:
msgbox(f"Invalid page num: {page}")
return
return paginate(page, max_page, 0)
Expand Down
2 changes: 1 addition & 1 deletion kohya_gui/sd_modeltype.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def hasKeyPrefix(pfx):
self.model_type = ModelType.SD2
elif hasKeyPrefix("model."):
self.model_type = ModelType.SD1
except:
except Exception:
pass

# print(f"Model type: {self.model_type}")
Expand Down