From 7f3fd74a314a1b8c40d0a68d88b75b4a2431c758 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Fri, 24 Jul 2020 18:05:58 +0200 Subject: [PATCH] read project name from .halfapiconfig --- halfapi/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/halfapi/conf.py b/halfapi/conf.py index a2c9d4c..3ebf49b 100644 --- a/halfapi/conf.py +++ b/halfapi/conf.py @@ -4,7 +4,9 @@ from os import environ import sys from configparser import ConfigParser -PROJECT_NAME = sys.argv.pop() +with open('.halfapiconfig') as f: + PROJECT_NAME = f.read() + if len(PROJECT_NAME) == 0: raise Exception('Need a project name as argument')