Use init function for settings

This commit is contained in:
Titoko 2016-05-19 19:19:09 +02:00
parent d3c0e1e466
commit 6b8d8a57c9

View File

@ -185,8 +185,7 @@ class Image(object):
def __repr__(self): def __repr__(self):
return self.name return self.name
def init():
def main():
error(os.path.exists(os.path.join(os.getcwd(), "settings.yaml")), "I can't find a " error(os.path.exists(os.path.join(os.getcwd(), "settings.yaml")), "I can't find a "
"settings.yaml in the current working directory") "settings.yaml in the current working directory")
@ -229,6 +228,10 @@ def main():
if settings["settings"].get("gm"): if settings["settings"].get("gm"):
SETTINGS["gm"].update(settings["settings"]["gm"]) SETTINGS["gm"].update(settings["settings"]["gm"])
return settings
def main():
settings = init()
front_page_galleries_cover = [] front_page_galleries_cover = []