1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

fix DebugWipeLoader being used for zipimporter

Summary:
X-link: https://github.com/facebookincubator/zstrong/pull/664

Need to insure DebugWipeLoader doesn't get used for zipimporter files.  The original imp.find_module that I replaced did not support zipimporter the new importlib find_spec does find the them.

Reviewed By: itamaro

Differential Revision: D52556833

fbshipit-source-id: bf5892a950a965bb3b17ab951910db2e33b69a34
This commit is contained in:
Jason Fried
2024-01-05 08:07:42 -08:00
committed by Facebook GitHub Bot
parent 650eb96e4a
commit f97b9daf1b

View File

@@ -120,7 +120,8 @@ class DebugWipeFinder(PathFinder):
code_impl.ob_size = 0
return code
spec.loader = DebugWipeLoader(fullname, spec.origin)
if isinstance(spec.loader, SourceFileLoader):
spec.loader = DebugWipeLoader(fullname, spec.origin)
return spec