diff options
author | InvincibleDude <81354513+InvincibleDude@users.noreply.github.com> | 2023-01-24 15:44:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-24 15:44:09 +0300 |
commit | 44c0e6b993d00bb2f441f0fde409bcb79136f034 (patch) | |
tree | e27a45d1a3ceb8aab884631c7a806c5fe2c8386d /modules/errors.py | |
parent | 3bc8ee998db5f461b8011a72e6f167012ccb8bc1 (diff) | |
parent | 602a1864b05075ca4283986e6f5c7d5bce864e11 (diff) |
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'modules/errors.py')
-rw-r--r-- | modules/errors.py | 12 |
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()
|