|
|
|
@ -98,6 +98,15 @@ def getpathenv():
|
|
|
|
|
envPath = set(env.get('PATH', '').split(":")) | bindir
|
|
|
|
|
return ":".join(envPath)
|
|
|
|
|
|
|
|
|
|
#decorator
|
|
|
|
|
def ensure_unicode(func):
|
|
|
|
|
def _ensure_unicode_wrapper(*args, **kwargs):
|
|
|
|
|
args = [x if not isinstance(x, bytes) else x.decode("UTF-8") for x in args]
|
|
|
|
|
for x in kwargs:
|
|
|
|
|
if isinstance(kwargs[x], bytes):
|
|
|
|
|
kwargs[x] = kwargs[x].decode("UTF-8")
|
|
|
|
|
return func(*args, **kwargs)
|
|
|
|
|
return _ensure_unicode_wrapper
|
|
|
|
|
|
|
|
|
|
from .files import process, listDirectory
|
|
|
|
|
|
|
|
|
|