Catch a more specific exception in environments that do not have a libc shared library.

This commit is contained in:
Ryan Dick 2023-10-03 12:20:09 -04:00
parent 5915a4a51c
commit ba54277011

View File

@ -53,13 +53,11 @@ class MemorySnapshot:
# time to test it properly. # time to test it properly.
vram = None vram = None
malloc_info = None
try: try:
malloc_info = LibcUtil().mallinfo2() malloc_info = LibcUtil().mallinfo2()
except Exception: except OSError:
# TODO(ryand): Catch a more specific exception.
# This is expected in environments that do not have the 'libc.so.6' shared library. # 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) return cls(process_ram, vram, malloc_info)