We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8dd2937 commit a36bab9Copy full SHA for a36bab9
importlib_metadata/__init__.py
@@ -797,10 +797,9 @@ def _clear_after_fork(cached):
797
Registering ``cache_clear`` with ``os.register_at_fork`` keeps each process
798
on its own cache.
799
"""
800
-
801
- register = getattr(os, 'register_at_fork', None)
802
- if register is not None:
803
- register(after_in_child=cached.cache_clear)
+ getattr(os, 'register_at_fork', lambda **kw: None)(
+ after_in_child=cached.cache_clear,
+ )
804
return cached
805
806
0 commit comments