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
|
||||
|
||||
[DEFAULT]
|
||||
userName = User
|
||||
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
|
||||
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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue