Displace default preferences in get_preferences method

merge-requests/64/head
Huluti 2016-12-11 00:25:41 +01:00
parent 58894fa9d3
commit 170de8be0e
1 changed files with 4 additions and 6 deletions

View File

@ -47,11 +47,6 @@ class ManjaroHello():
# Load preferences
self.preferences = self.get_preferences()
if not self.preferences:
self.preferences = {
"autostart": os.path.isfile(self.autostart_path),
"locale": None
}
# Load system infos
self.infos = get_infos()
@ -186,7 +181,10 @@ class ManjaroHello():
with open(self.preferences_path, "r") as f:
return json.load(f)
except OSError as e:
return None
return {
"autostart": os.path.isfile(self.autostart_path),
"locale": None
}
def read_page(self, name):
filename = self.data_path + "pages/{}/{}".format(self.preferences["locale"], name)