]> granicus.if.org Git - python/commitdiff
Issue #16804: Fix 'python -S -m site' failure.
authorMeador Inge <meadori@gmail.com>
Sun, 14 Apr 2013 01:51:04 +0000 (20:51 -0500)
committerMeador Inge <meadori@gmail.com>
Sun, 14 Apr 2013 01:51:04 +0000 (20:51 -0500)
This commit fixes a bug in the 'site' module that was causing an exception
to incorrectly be thrown when running 'python -S -m site'.  The problem was
that 'USER_BASE' and 'USER_SITE' were being accessed before they were properly
initialized.  The code has been changed to use 'getuserbase' and
'getusersitepackages' instead so that the initialization always happens.

1  2 
Lib/site.py
Misc/NEWS

diff --cc Lib/site.py
Simple merge
diff --cc Misc/NEWS
index c50b41a2079416f10fe3151291051a4e0b6df0b2,3187ab0f47283e3a745d5a24d1cee7b65e6b4d3e..9284be34b723b4c8cc3e1d2509cf47404fdde0fe
+++ b/Misc/NEWS
@@@ -46,11 -29,9 +46,14 @@@ Core and Builtin
  Library
  -------
  
+ - Issue #16804: Fix a bug in the 'site' module that caused running
+   'python -S -m site' to incorrectly throw an exception.
 +- Issue #15480: Remove the deprecated and unused TYPE_INT64 code from marshal.
 +  Initial patch by Daniel Riti.
 +
 +- Issue #2118: SMTPException is now a subclass of IOError.
 +
  - Issue #17016: Get rid of possible pointer wraparounds and integer overflows
    in the re module.  Patch by Nickolai Zeldovich.