From 6188c5a50638dd3b62789c152564b14db9a3ac15 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 20 Feb 2018 12:11:40 +0100 Subject: Goniec settings are no longer mandatory and have sane defaults --- jfr_playoff/filemanager.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jfr_playoff/filemanager.py b/jfr_playoff/filemanager.py index 75eb6be..e60976b 100644 --- a/jfr_playoff/filemanager.py +++ b/jfr_playoff/filemanager.py @@ -8,7 +8,7 @@ import __main__ class PlayoffFileManager(object): def __init__(self, settings): - self.goniec = settings.get('goniec') + self.goniec = settings.get('goniec') if settings.has_section('goniec') else None self.output_file = settings.get('output') self.output_path = os.path.dirname( self.output_file @@ -41,8 +41,12 @@ class PlayoffFileManager(object): return script_output_path def send_files(self): - if self.goniec['enabled']: + if (self.goniec is not None) and self.goniec['enabled']: try: + if 'host' not in self.goniec: + self.goniec['host'] = 'localhost' + if 'port' not in self.goniec: + self.goniec['port'] = 8090 content_lines = [self.output_path] + \ list(self.files) + \ ['bye', ''] -- cgit v1.2.3