[py-svn] py-trunk commit d67c0d87eefe: fix windows homedir detection

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jul 8 12:36:45 CEST 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User holger krekel <holger at merlinux.eu>
# Date 1278585343 -7200
# Node ID d67c0d87eefe23990caf25aefea8da7d87523d3c
# Parent  66b03b254e32fe40aff0551adc19fc1c9f288a19
fix windows homedir detection

--- a/py/_path/local.py
+++ b/py/_path/local.py
@@ -618,7 +618,7 @@ class LocalPath(FSBase):
         try:
             x = os.environ['HOME']
         except KeyError:
-            x = os.environ['HOMEPATH']
+            x = os.environ["HOMEDRIVE"] + os.environ['HOMEPATH']
         return cls(x)
     _gethomedir = classmethod(_gethomedir)
 

--- a/CHANGELOG
+++ b/CHANGELOG
@@ -72,6 +72,7 @@ Bug fixes / Maintenance
 - perform distributed testing related reporting in the xdist-plugin 
   rather than having dist-related code in the generic py.test 
   distribution
+- fix homedir detection on Windows 
 
 Changes between 1.3.0 and 1.3.1
 ==================================================



More information about the pytest-commit mailing list