config: expand '~' and '~user' in paths
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
# Authors: Ali Saidi
|
# Authors: Ali Saidi
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
from os.path import isdir, join as joinpath
|
from os.path import join as joinpath
|
||||||
from os import environ as env
|
from os import environ as env
|
||||||
|
|
||||||
config_path = os.path.dirname(os.path.abspath(__file__))
|
config_path = os.path.dirname(os.path.abspath(__file__))
|
||||||
@@ -59,6 +59,9 @@ def system():
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system' ]
|
path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system' ]
|
||||||
|
|
||||||
|
# expand '~' and '~user' in paths
|
||||||
|
path = map(os.path.expanduser, path)
|
||||||
|
|
||||||
# filter out non-existent directories
|
# filter out non-existent directories
|
||||||
system.path = filter(os.path.isdir, path)
|
system.path = filter(os.path.isdir, path)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user