diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-05-09 19:40:51 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 19:40:51 +0000 |
commit | d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a (patch) | |
tree | 894f00b92caa229dbfaa2d07c16c25e0167412db /modules/call_queue.py | |
parent | ccbb361845bfabfa3fc2c77bb234ea4be0781dd9 (diff) | |
parent | 3ba6c3c83c0983a025c7bddc08bb7f49481b3cbb (diff) | |
download | stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.tar.gz stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.tar.bz2 stable-diffusion-webui-gfx803-d6a9b22c195a0b4b9c6b04ccdfc59c18d099da7a.zip |
Merge pull request #10232 from akx/eff
Fix up string formatting/concatenation to f-strings where feasible
Diffstat (limited to 'modules/call_queue.py')
-rw-r--r-- | modules/call_queue.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/call_queue.py b/modules/call_queue.py index 1829f3a6..447bb764 100644 --- a/modules/call_queue.py +++ b/modules/call_queue.py @@ -60,7 +60,7 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): max_debug_str_len = 131072 # (1024*1024)/8
print("Error completing request", file=sys.stderr)
- argStr = f"Arguments: {str(args)} {str(kwargs)}"
+ argStr = f"Arguments: {args} {kwargs}"
print(argStr[:max_debug_str_len], file=sys.stderr)
if len(argStr) > max_debug_str_len:
print(f"(Argument list truncated at {max_debug_str_len}/{len(argStr)} characters)", file=sys.stderr)
@@ -73,7 +73,8 @@ def wrap_gradio_call(func, extra_outputs=None, add_stats=False): if extra_outputs_array is None:
extra_outputs_array = [None, '']
- res = extra_outputs_array + [f"<div class='error'>{html.escape(type(e).__name__+': '+str(e))}</div>"]
+ error_message = f'{type(e).__name__}: {e}'
+ res = extra_outputs_array + [f"<div class='error'>{html.escape(error_message)}</div>"]
shared.state.skipped = False
shared.state.interrupted = False
|