Skip to content

Commit e91b9f5

Browse files
committed
Actually a0.5
Fixed crash because of wrong config creation. Fixed a typo. I noticed it and it annoyed me.
1 parent 8960ae7 commit e91b9f5

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

launcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self):
5454
# This sets up all the crap you see.
5555
def initUI(self):
5656
global threadingEvent, update
57-
update = utils.checkOnline() # Unused. Gonna be used for update checking and the modpack repo then that is made.
57+
update = utils.checkOnline() # Unused. Gonna be used for update checking and the modpack repo when that is made.
5858
self.setWindowTitle(self.title)
5959
self.setGeometry(self.left, self.top, 854, 480)
6060
self.colorBackground()

utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def getFile(relative_path, instanceName=""):
4848
# If the json is malformed, then it backs it up and remakes it.
4949
def loadSettings(self):
5050
if not os.path.exists(config.MC_DIR + "/launcher_config.json"):
51-
saveSettings(config.DEFAULT_LAUNCHER_CONFIG)
51+
saveSettings(json.loads(config.DEFAULT_LAUNCHER_CONFIG))
5252
try:
5353
with open(config.MC_DIR + "/launcher_config.json", "r") as file:
5454
launcherConfig = json.loads(file.read())
5555
except:
56-
self.error("Couldn't read instance config. Renamed to \"instance_config.json.bak\"")
57-
shutil.move(config.MC_DIR + "/launcher_config.json", config.MC_DIR + "/launcher_config.bak")
58-
saveSettings(config.DEFAULT_LAUNCHER_CONFIG)
56+
print("Couldn't read launcher config. Renamed to \"instance_config.json.bak\"")
57+
shutil.move(config.MC_DIR + "/launcher_config.json", config.MC_DIR + "/launcher_config.json.bak")
58+
saveSettings(config.DEFAULT_INSTANCE_CONFIG)
5959
with open(config.MC_DIR + "/launcher_config.json", "r") as file:
6060
launcherConfig = json.loads(file.read())
6161

0 commit comments

Comments
 (0)