kopia lustrzana https://github.com/micropython/micropython-lib
upip: expandhome(): Call uos.getenv() only if there's something to expand.
To work on baremetal targets without getenv().pull/106/head
rodzic
f115b8c22f
commit
c06f693ac3
|
@ -89,6 +89,7 @@ def install_tar(f, prefix):
|
||||||
return meta
|
return meta
|
||||||
|
|
||||||
def expandhome(s):
|
def expandhome(s):
|
||||||
|
if "~/" in s:
|
||||||
h = os.getenv("HOME")
|
h = os.getenv("HOME")
|
||||||
s = s.replace("~/", h + "/")
|
s = s.replace("~/", h + "/")
|
||||||
return s
|
return s
|
||||||
|
|
Ładowanie…
Reference in New Issue