diff options
author | timntorres <timothynarcisotorres@gmail.com> | 2022-10-19 21:23:48 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-21 06:55:00 +0000 |
commit | 2273e752fb3e578f1047f6d38b96330b07bf61a9 (patch) | |
tree | 1ad7dcdfc9e89d29a6272de36a2614e39cd13df1 | |
parent | 4ff274e1e35bb642687253ce744d2cfa738ab293 (diff) | |
download | stable-diffusion-webui-gfx803-2273e752fb3e578f1047f6d38b96330b07bf61a9.tar.gz stable-diffusion-webui-gfx803-2273e752fb3e578f1047f6d38b96330b07bf61a9.tar.bz2 stable-diffusion-webui-gfx803-2273e752fb3e578f1047f6d38b96330b07bf61a9.zip |
Remove redundant try/except.
-rw-r--r-- | modules/images.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/modules/images.py b/modules/images.py index b8834e3c..b9589563 100644 --- a/modules/images.py +++ b/modules/images.py @@ -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)
|