]> granicus.if.org Git - python/commitdiff
Issue #16972: Have site.addpackage() consider known paths even when
authorBrett Cannon <brett@python.org>
Fri, 25 Jan 2013 18:57:16 +0000 (13:57 -0500)
committerBrett Cannon <brett@python.org>
Fri, 25 Jan 2013 18:57:16 +0000 (13:57 -0500)
none are explicitly passed in.

Lib/site.py
Misc/NEWS

index c4c8ea040e5f8060855541b0b1597e36b8e70e33..732e1c4d2e70cbac3e138868c0522887a96905ce 100644 (file)
@@ -146,7 +146,7 @@ def addpackage(sitedir, name, known_paths):
        and add that to known_paths, or execute it if it starts with 'import '.
     """
     if known_paths is None:
-        _init_pathinfo()
+        known_paths = _init_pathinfo()
         reset = 1
     else:
         reset = 0
index 6a8c24ca0a4fd53ad969c615a81a0d13283355d7..c7e20348ea0490bf2f3e89ad8a7ab1abe046a26e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -218,6 +218,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #180022: Have site.addpackage() consider already known paths even when
+  none are explicitly passed in. Bug report and fix by Kirill.
+
 - Issue #1602133: on Mac OS X a shared library build (``--enable-shared``)
   now fills the ``os.environ`` variable correctly.