summaryrefslogtreecommitdiff
path: root/jfr_playoff/filemanager.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2018-02-20 12:11:40 +0100
committeremkael <emkael@tlen.pl>2018-02-20 12:11:40 +0100
commit6188c5a50638dd3b62789c152564b14db9a3ac15 (patch)
treec1ced39db7519a34343e74ed746870aacf9890c8 /jfr_playoff/filemanager.py
parent5cd0b206c59f44c9f551b931bdef53a4ae64e655 (diff)
Goniec settings are no longer mandatory and have sane defaults
Diffstat (limited to 'jfr_playoff/filemanager.py')
-rw-r--r--jfr_playoff/filemanager.py8
1 files 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', '']