upip: expandhome(): Call uos.getenv() only if there's something to expand.

To work on baremetal targets without getenv().
pull/106/head
Paul Sokolovsky 2016-10-08 00:36:24 +03:00
rodzic f115b8c22f
commit c06f693ac3
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -89,8 +89,9 @@ def install_tar(f, prefix):
return meta
def expandhome(s):
h = os.getenv("HOME")
s = s.replace("~/", h + "/")
if "~/" in s:
h = os.getenv("HOME")
s = s.replace("~/", h + "/")
return s
import ussl