[mod] fuck this, let's make things KISS
This commit is contained in:
parent
263757a278
commit
e666c0400d
@ -5,15 +5,12 @@ import sys
|
|||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
|
|
||||||
SETTINGS_NAME = ("settings.yaml", "settings.yml")
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if not any(map(lambda x: os.path.exists(os.path.join(os.getcwd(), x)), SETTINGS_NAME)):
|
if not os.path.exists(os.path.join(os.getcwd(), "settings.yaml")):
|
||||||
sys.stderr.write("I can't find a settings.yaml or settings.yml, abort\n")
|
sys.stderr.write("I can't find a settings.yaml, abort\n")
|
||||||
sys.exit(1)
|
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"):
|
if not os.path.exists("build"):
|
||||||
os.makedirs("build")
|
os.makedirs("build")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user