Fix a little annoying issue with config files

This commit is contained in:
Maxwell Jeffress 2024-07-15 17:03:15 +10:00
parent ac03e87e02
commit 16bdb47759

View File

@ -11,7 +11,6 @@ from datetime import datetime
from colorama import Fore from colorama import Fore
from os.path import expanduser from os.path import expanduser
# Some initial variables # Some initial variables
version = "0.2.0" version = "0.2.0"
user = os.getlogin() user = os.getlogin()
@ -36,7 +35,7 @@ for line in configFile:
confArgList[confArgNumber] = confArgList[confArgNumber] + ":" confArgList[confArgNumber] = confArgList[confArgNumber] + ":"
confArgNumber = confArgNumber + 1 confArgNumber = confArgNumber + 1
elif letter == ',': elif letter == ',':
confArgList.append(",") confArgList.append("")
confArgNumber = confArgNumber + 1 confArgNumber = confArgNumber + 1
else: else:
try: try:
@ -49,7 +48,7 @@ for word in confArgList:
for word in confArgList: for word in confArgList:
if word == "motd:": if word == "motd:":
motd = confArgList[confArgList.index(word) + 1] motd = confArgList[confArgList.index(word) + 1]
if word == ",mashPath:": if word == "mashPath:":
mashPathStr = (confArgList[confArgList.index(word) + 1]) mashPathStr = (confArgList[confArgList.index(word) + 1])
pathStrIndex = 0 pathStrIndex = 0
mashPath = [""] mashPath = [""]