read project name from .halfapiconfig

This commit is contained in:
Maxime Alves LIRMM 2020-07-24 18:05:58 +02:00
parent 98f0536a1a
commit 7f3fd74a31
1 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,9 @@ from os import environ
import sys import sys
from configparser import ConfigParser from configparser import ConfigParser
PROJECT_NAME = sys.argv.pop() with open('.halfapiconfig') as f:
PROJECT_NAME = f.read()
if len(PROJECT_NAME) == 0: if len(PROJECT_NAME) == 0:
raise Exception('Need a project name as argument') raise Exception('Need a project name as argument')