summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-11-16 22:32:26 +0100
committeremkael <emkael@tlen.pl>2016-11-16 22:32:26 +0100
commit54fda32331ea1319b5018c4482ab82e6f9166f1e (patch)
treec645f57eaeb7795f9d184beaa7e97d824e7c8014
parent0a19990796663d80e3ed53fe1d62f26c47294fef (diff)
* factoring Goniec params gathering out to separate method
-rw-r--r--src/bidding_data_gui.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bidding_data_gui.py b/src/bidding_data_gui.py
index caaa10c..4f95152 100644
--- a/src/bidding_data_gui.py
+++ b/src/bidding_data_gui.py
@@ -57,10 +57,7 @@ class BiddingGUI(tk.Frame):
raise Exception('Tournament results file not found')
# Goniec parameters/switches
- goniec_params = '%s:%d' % (
- self.__variables['goniec_host'].get(),
- self.__variables['goniec_port'].get()
- ) if self.__variables['goniec_enabled'].get() == 1 else None
+ goniec_params = self.__compile_goniec_params()
# do the magic
from bidding_data import JFRBidding
@@ -576,6 +573,12 @@ class BiddingGUI(tk.Frame):
json.dump(self.__default_config, file(CONFIG_FILE, 'w'),
sort_keys=True, indent=4)
+ def __compile_goniec_params(self):
+ return '%s:%d' % (
+ self.__variables['goniec_host'].get(),
+ self.__variables['goniec_port'].get()
+ ) if self.__variables['goniec_enabled'].get() == 1 else None
+
def main():
"""Entry point for application - spawn main window."""