Skip to content
This repository was archived by the owner on Jan 23, 2024. It is now read-only.

Commit e87c007

Browse files
Louis Yecopybara-github
authored andcommitted
Handle module file being non-str type in python agent.
PiperOrigin-RevId: 268031522 Change-Id: I06557c6191847b2433cde2f49116a4b16ddbcf13
1 parent 1dae55a commit e87c007

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/googleclouddebugger/imphook2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ def GetModuleFromName(name, path):
422422
mod_file = getattr(module, '__file__', None)
423423
if not mod_file:
424424
continue
425+
if not isinstance(mod_file, str):
426+
continue
425427

426428
mod_root = os.path.splitext(mod_file)[0]
427429

0 commit comments

Comments
 (0)