# HG changeset patch # User Paul Boddie # Date 1401659214 -7200 # Node ID 56b09bd4db2a33aabe8e953c6b9aae40ad78dd64 # Parent 58923323e469581346bd246b7edf5aa0a46b5d0f Made package imports fail properly when submodules cannot be found. diff -r 58923323e469 -r 56b09bd4db2a micropython/__init__.py --- a/micropython/__init__.py Sat May 10 17:26:04 2014 +0200 +++ b/micropython/__init__.py Sun Jun 01 23:46:54 2014 +0200 @@ -842,6 +842,10 @@ # Stop descending if no package was found. if not d: + if path != path_so_far: + if self.verbose: + print >>sys.stderr, "Not found (%s)" % p + return None break # Return either the deepest or the uppermost module.