aboutsummaryrefslogtreecommitdiff
path: root/modules/errors.py
diff options
context:
space:
mode:
authorInvincibleDude <81354513+InvincibleDude@users.noreply.github.com>2023-01-24 15:44:09 +0300
committerGitHub <noreply@github.com>2023-01-24 15:44:09 +0300
commit44c0e6b993d00bb2f441f0fde409bcb79136f034 (patch)
treee27a45d1a3ceb8aab884631c7a806c5fe2c8386d /modules/errors.py
parent3bc8ee998db5f461b8011a72e6f167012ccb8bc1 (diff)
parent602a1864b05075ca4283986e6f5c7d5bce864e11 (diff)
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'modules/errors.py')
-rw-r--r--modules/errors.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/errors.py b/modules/errors.py
index a10e8708..f6b80dbb 100644
--- a/modules/errors.py
+++ b/modules/errors.py
@@ -24,6 +24,18 @@ See https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable
""")
+already_displayed = {}
+
+
+def display_once(e: Exception, task):
+ if task in already_displayed:
+ return
+
+ display(e, task)
+
+ already_displayed[task] = 1
+
+
def run(code, task):
try:
code()