Commit 97dede02 authored by Guido van Rossum's avatar Guido van Rossum

Fix for SF 686380, from SF patch 686771 by Ping. (errors trying to

get help on os attributes)
parent 0ae4c4a8
......@@ -1303,7 +1303,7 @@ def describe(thing):
def locate(path, forceload=0):
"""Locate an object by name or dotted path, importing as necessary."""
parts = split(path, '.')
parts = [part for part in split(path, '.') if part]
module, n = None, 0
while n < len(parts):
nextmodule = safeimport(join(parts[:n+1], '.'), forceload)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment