diff options
author | emkael <emkael@tlen.pl> | 2019-07-22 11:52:38 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-07-22 11:52:38 +0200 |
commit | 8c0b4f0f0ea0fddcdad348fb0c5a9f546375ec29 (patch) | |
tree | b06936a260935479b88da715c04a716f5cca98f3 /jfr_playoff/gui/frames/network.py | |
parent | 8bf96412b75689c578f5690dd0974304265d7fea (diff) |
Ordered dictionaries for config export
Diffstat (limited to 'jfr_playoff/gui/frames/network.py')
-rw-r--r-- | jfr_playoff/gui/frames/network.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/jfr_playoff/gui/frames/network.py b/jfr_playoff/gui/frames/network.py index fc00575..90c21d1 100644 --- a/jfr_playoff/gui/frames/network.py +++ b/jfr_playoff/gui/frames/network.py @@ -1,6 +1,7 @@ #coding=utf-8 import socket +from collections import OrderedDict import tkinter as tk from tkinter import ttk @@ -27,12 +28,12 @@ class MySQLConfigurationFrame(GuiFrame): def getConfig(self): if len(self.host.get().strip()): - return { + return OrderedDict({ 'host': self.host.get().strip(), 'port': self.port.get(default=3306), 'user': self.user.get().strip(), 'pass': self.pass_.get().strip() - } + }) return None def _testDB(self): @@ -167,9 +168,9 @@ class GoniecConfigurationFrame(GuiFrame): self.enable.set(values['enabled'] if 'enabled' in values else 0) def getValues(self): - config = { + config = OrderedDict({ 'enabled': self.enable.get() - } + }) if self.enable.get(): config['host'] = self.host.get() config['port'] = self.port.get() |