aboutsummaryrefslogtreecommitdiff
path: root/webui.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-03-11 14:02:07 +0300
committerGitHub <noreply@github.com>2023-03-11 14:02:07 +0300
commit9df72be90e8275434501bdc61bdf8bb4472105c2 (patch)
treea0cf66b5db9a60ac4d45d52ed2272716bb31ff25 /webui.py
parent9860a6acdaeda353385f62e6b1cbafbda2d681a4 (diff)
parentfc3063d9b924c094b59229269f4afe722b120d88 (diff)
Merge pull request #8202 from Ju1-js/master
Gradio auth logic fix - Handle empty/newlines
Diffstat (limited to 'webui.py')
-rw-r--r--webui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/webui.py b/webui.py
index 9e8b486a..be39fa8d 100644
--- a/webui.py
+++ b/webui.py
@@ -209,11 +209,11 @@ def webui():
gradio_auth_creds = []
if cmd_opts.gradio_auth:
- gradio_auth_creds += cmd_opts.gradio_auth.strip('"').replace('\n', '').split(',')
+ gradio_auth_creds += [x.strip() for x in cmd_opts.gradio_auth.strip('"').replace('\n', '').split(',') if x.strip()]
if cmd_opts.gradio_auth_path:
with open(cmd_opts.gradio_auth_path, 'r', encoding="utf8") as file:
for line in file.readlines():
- gradio_auth_creds += [x.strip() for x in line.split(',')]
+ gradio_auth_creds += [x.strip() for x in line.split(',') if x.strip()]
app, local_url, share_url = shared.demo.launch(
share=cmd_opts.share,