add comment line handling

This commit is contained in:
2019-10-06 12:21:03 +02:00
parent 8ba5905c47
commit 918782ff3e

View File

@@ -9,6 +9,7 @@ app = flask.Flask("webhook-listener")
TOKEN_HEADER = "X-Gitlab-Token"
PROJECT_IDENTIFIER = "web_url"
SEPERATOR = ","
COMMENT_INDICATOR = "#"
config = {}
##### FRONTEND PATHS ########
@@ -51,6 +52,8 @@ def readExecutionConfig(configFile):
global config
with open(configFile, "r") as f:
for line in f:
if line.startswith(COMMENT_INDICATOR):
continue
projectIdent, token, scriptName = line.split(SEPERATOR)
config.update({projectIdent:(token, scriptName)})