| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9b1f474 commit eaecc69
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,23 +36,6 @@ def _new_module(name): | |||
| 36 | 36 | return type(sys)(name) | |
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | - class _ManageReload: | ||
| 40 | - | ||
| 41 | - """Manages the possible clean-up of sys.modules for load_module().""" | ||
| 42 | - | ||
| 43 | - def __init__(self, name): | ||
| 44 | - self._name = name | ||
| 45 | - | ||
| 46 | - def __enter__(self): | ||
| 47 | - self._is_reload = self._name in sys.modules | ||
| 48 | - | ||
| 49 | - def __exit__(self, *args): | ||
| 50 | - if any(arg is not None for arg in args) and not self._is_reload: | ||
| 51 | - try: | ||
| 52 | - del sys.modules[self._name] | ||
| 53 | - except KeyError: | ||
| 54 | - pass | ||
| 55 | - | ||
| 56 | 39 | # Module-level locking ######################################################## | |
| 57 | 40 | ||
| 58 | 41 | # A dict mapping module names to weakrefs of _ModuleLock instances | |
| Back | FazBrowse Home | New Git URL |
0 commit comments