mirror of
https://github.com/MaxenceG2M/github-release-notifier.git
synced 2025-12-08 13:53:24 +00:00
Validate configuration + readable error
Change docker-compose version - use Just to handle version
This commit is contained in:
@@ -3,7 +3,7 @@ version: '3'
|
||||
services:
|
||||
notifier:
|
||||
build: .
|
||||
image: github-release-notifier:1
|
||||
image: github-release-notifier
|
||||
container_name: github-release-notifier
|
||||
volumes:
|
||||
- ./conf.ini:/app/conf.ini
|
||||
|
||||
@@ -3,6 +3,7 @@ import datetime
|
||||
import json
|
||||
import os
|
||||
import smtplib
|
||||
import sys
|
||||
from email.mime.multipart import MIMEMultipart
|
||||
from email.mime.text import MIMEText
|
||||
|
||||
@@ -36,7 +37,13 @@ def main():
|
||||
parser.read(conf_file)
|
||||
default_config = parser["config"]
|
||||
|
||||
try:
|
||||
projects = json.loads(parser.get("projects", "projects"))
|
||||
except json.decoder.JSONDecodeError as jse:
|
||||
print("ERROR: config file is not correctly JSON formatted!", end="\n\t")
|
||||
print(jse)
|
||||
sys.exit(1)
|
||||
|
||||
new_releases = []
|
||||
new_projects = []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user