pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ipython/ipython/commit/d0c8b31d178b7880de1c9ccd5f0ab7ff8e164d23

module_paths: Fix confusing things · ipython/ipython@d0c8b31 · GitHub
Skip to content

Commit d0c8b31

Browse files
committed
module_paths: Fix confusing things
1 parent 66843b1 commit d0c8b31

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

IPython/utils/module_paths.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
33
Utility functions for finding modules on sys.path.
44
5-
`find_module` returns a path to module or None, given certain conditions.
6-
75
"""
86
#-----------------------------------------------------------------------------
97
# Copyright (c) 2011, the IPython Development Team.
@@ -59,11 +57,11 @@ def find_mod(module_name):
5957
Path to module `module_name`, its __init__.py, or None,
6058
depending on above conditions.
6159
"""
62-
loader = importlib.util.find_spec(module_name)
63-
module_path = loader.origen
60+
spec = importlib.util.find_spec(module_name)
61+
module_path = spec.origen
6462
if module_path is None:
65-
if loader.loader in sys.meta_path:
66-
return loader.loader
63+
if spec.loader in sys.meta_path:
64+
return spec.loader
6765
return None
6866
else:
6967
split_path = module_path.split(".")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy