Remove redundant try/except.
This commit is contained in:
parent
4ff274e1e3
commit
2273e752fb
|
@ -416,11 +416,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
|
|||
dirname = apply_filename_pattern(opts.directories_filename_pattern or "[prompt_words]", p, seed, prompt).strip('\\ /')
|
||||
path = os.path.join(path, dirname)
|
||||
|
||||
try:
|
||||
os.makedirs(path, exist_ok=True)
|
||||
except FileExistsError:
|
||||
# If the file already exists, allow said file to be overwritten.
|
||||
pass
|
||||
os.makedirs(path, exist_ok=True)
|
||||
|
||||
if forced_filename is None:
|
||||
basecount = get_next_sequence_number(path, basename)
|
||||
|
|
Loading…
Reference in New Issue
Block a user