mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Catch a more specific exception in environments that do not have a libc shared library.
This commit is contained in:
parent
5915a4a51c
commit
ba54277011
@ -53,13 +53,11 @@ class MemorySnapshot:
|
||||
# time to test it properly.
|
||||
vram = None
|
||||
|
||||
malloc_info = None
|
||||
try:
|
||||
malloc_info = LibcUtil().mallinfo2()
|
||||
except Exception:
|
||||
# TODO(ryand): Catch a more specific exception.
|
||||
except OSError:
|
||||
# This is expected in environments that do not have the 'libc.so.6' shared library.
|
||||
pass
|
||||
malloc_info = None
|
||||
|
||||
return cls(process_ram, vram, malloc_info)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user