Now About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src/config.py
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-10-06 17:34:29 +0100
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2024-10-06 17:34:29 +0100
commitdb10dc4fdd656b25442c63eb02ea30931eee300e (patch)
tree9b2a4e835d6d52b48c0e7fb9bcb83884999ee1da /src/config.py
parent0dc8409b168b293e9566dc5a35bded510fbd043d (diff)
window: Add interface for connecting and disconnecting
Diffstat (limited to 'src/config.py')
-rw-r--r--src/config.py18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/config.py b/src/config.py
index ac52063..dc7d507 100644
--- a/src/config.py
+++ b/src/config.py
@@ -34,13 +34,13 @@ CONFIG_DEFAULT_RELAY_LINES = 50
CONFIG_DEFAULT_SECTIONS = ('relay', 'look', 'color', 'ssh', 'upload')
CONFIG_DEFAULT_OPTIONS = (('relay.hostname', ''),
- ('relay.port', ''),
- ('relay.ssl', 'off'),
+ ('relay.port', 0),
+ ('relay.ssl', False),
('relay.password', ''),
- ('relay.autoconnect', 'off'),
+ ('relay.autoconnect', False),
('relay.lines', str(CONFIG_DEFAULT_RELAY_LINES)),
('ssh.host', ''),
- ('ssh.port', ''),
+ ('ssh.port', 0),
('ssh.username', ''),
('ssh.key', ''),
('upload.url', ''),
@@ -139,3 +139,13 @@ def color_options():
"""Return color options."""
global config_options
return config_options["color"]
+
+def str_to_bool(value):
+ truthy = ["true", "1", "on", "y", "yes", "t", "i"]
+ #falsy = ["false", "0", "off", "n", "no", "f", "o"]
+
+ lower_val = value.lower()
+ if lower_val in truthy:
+ return True
+ else:
+ return False