removed all occurances of user configuration (doesn't work)

This commit is contained in:
Fierelier 2019-09-22 03:39:28 +02:00
parent 473e10e0ab
commit b17c6c6b65
2 changed files with 4 additions and 7 deletions

View File

@ -13,6 +13,6 @@
# it is generally recommended that you leave these values as they are, if you want the most compatibility
[DEFAULT]
userName = User
prefixLocation = $sd+/prefixes
homeLocation = $config:DEFAULT/prefixLocation+/+$prefix+/home
homeLocation = $config:DEFAULT/prefixLocation+/+$prefix+/home

View File

@ -12,7 +12,6 @@ p = os.path.join
#initializing the default configuration
config = configparser.ConfigParser()
config["DEFAULT"] = {
"userName": "User",
"prefixLocation": "$sd+/prefixes",
"homeLocation": "$config:DEFAULT/prefixLocation+/+$prefix+/home"
}
@ -62,8 +61,6 @@ cv = parseConfigValue
def launchPrefix(prefix,cmd,raw = False):
configVars["prefix"] = prefix
home = os.environ["HOME"]
user = os.environ["USER"]
os.environ["USER"] = cv(config["DEFAULT"]["userName"])
os.environ["HOME"] = cv(config["DEFAULT"]["homeLocation"])
os.environ["WINEPREFIX"] = p(cv(config["DEFAULT"]["prefixLocation"]),prefix)
if raw == False:
@ -71,7 +68,6 @@ def launchPrefix(prefix,cmd,raw = False):
else:
subprocess.call(cmd)
os.environ["HOME"] = home
os.environ["USER"] = user
del os.environ["WINEPREFIX"]
del configVars["prefix"]
@ -147,4 +143,5 @@ def main():
if __name__ == "__main__":
loadConfig()
main()
main()