removed all occurances of user configuration (doesn't work)
This commit is contained in:
parent
473e10e0ab
commit
b17c6c6b65
|
@ -13,6 +13,6 @@
|
||||||
# it is generally recommended that you leave these values as they are, if you want the most compatibility
|
# it is generally recommended that you leave these values as they are, if you want the most compatibility
|
||||||
|
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
userName = User
|
|
||||||
prefixLocation = $sd+/prefixes
|
prefixLocation = $sd+/prefixes
|
||||||
homeLocation = $config:DEFAULT/prefixLocation+/+$prefix+/home
|
homeLocation = $config:DEFAULT/prefixLocation+/+$prefix+/home
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ p = os.path.join
|
||||||
#initializing the default configuration
|
#initializing the default configuration
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config["DEFAULT"] = {
|
config["DEFAULT"] = {
|
||||||
"userName": "User",
|
|
||||||
"prefixLocation": "$sd+/prefixes",
|
"prefixLocation": "$sd+/prefixes",
|
||||||
"homeLocation": "$config:DEFAULT/prefixLocation+/+$prefix+/home"
|
"homeLocation": "$config:DEFAULT/prefixLocation+/+$prefix+/home"
|
||||||
}
|
}
|
||||||
|
@ -62,8 +61,6 @@ cv = parseConfigValue
|
||||||
def launchPrefix(prefix,cmd,raw = False):
|
def launchPrefix(prefix,cmd,raw = False):
|
||||||
configVars["prefix"] = prefix
|
configVars["prefix"] = prefix
|
||||||
home = os.environ["HOME"]
|
home = os.environ["HOME"]
|
||||||
user = os.environ["USER"]
|
|
||||||
os.environ["USER"] = cv(config["DEFAULT"]["userName"])
|
|
||||||
os.environ["HOME"] = cv(config["DEFAULT"]["homeLocation"])
|
os.environ["HOME"] = cv(config["DEFAULT"]["homeLocation"])
|
||||||
os.environ["WINEPREFIX"] = p(cv(config["DEFAULT"]["prefixLocation"]),prefix)
|
os.environ["WINEPREFIX"] = p(cv(config["DEFAULT"]["prefixLocation"]),prefix)
|
||||||
if raw == False:
|
if raw == False:
|
||||||
|
@ -71,7 +68,6 @@ def launchPrefix(prefix,cmd,raw = False):
|
||||||
else:
|
else:
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
os.environ["HOME"] = home
|
os.environ["HOME"] = home
|
||||||
os.environ["USER"] = user
|
|
||||||
del os.environ["WINEPREFIX"]
|
del os.environ["WINEPREFIX"]
|
||||||
del configVars["prefix"]
|
del configVars["prefix"]
|
||||||
|
|
||||||
|
@ -147,4 +143,5 @@ def main():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
loadConfig()
|
loadConfig()
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue