From e666c0400db64c36212c2ea1712bdcfde0d3afe5 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Tue, 8 Dec 2015 07:06:23 +0100 Subject: [PATCH] [mod] fuck this, let's make things KISS --- prosopopoee | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/prosopopoee b/prosopopoee index 15b8229..30eb393 100755 --- a/prosopopoee +++ b/prosopopoee @@ -5,15 +5,12 @@ import sys import yaml -SETTINGS_NAME = ("settings.yaml", "settings.yml") - - def main(): - if not any(map(lambda x: os.path.exists(os.path.join(os.getcwd(), x)), SETTINGS_NAME)): - sys.stderr.write("I can't find a settings.yaml or settings.yml, abort\n") + if not os.path.exists(os.path.join(os.getcwd(), "settings.yaml")): + sys.stderr.write("I can't find a settings.yaml, abort\n") sys.exit(1) - settings = yaml.safe_load(filter(lambda x: os.path.exists(os.path.join(os.getcwd(), x)), SETTINGS_NAME)[0]) + settings = yaml.safe_load("settings.yaml") if not os.path.exists("build"): os.makedirs("build")