diff --git a/clients/network_client.py b/clients/network_client.py index 8278ae4..87f870e 100644 --- a/clients/network_client.py +++ b/clients/network_client.py @@ -49,7 +49,7 @@ class BBJ(object): See the offical API error documentation for more details. """ - def __init__(self, host="127.0.0.1", port=7099): + def __init__(self, host="127.0.0.1", port=7099, https=False): """ Optionally takes port and host as kwargs. It will immediately try to resolve a connection to the server, if its down, it @@ -71,7 +71,7 @@ class BBJ(object): If you set this to False, anonymous network usage is guaranteed. """ - self.base = "http://{}:{}/api/%s".format(host, port) + self.base = "http{}://{}:{}/api/%s".format("s" if https else "", host, port) self.user_name = self.user_auth = None self.send_auth = True try: diff --git a/clients/urwid/main.py b/clients/urwid/main.py index ab5050a..229d03d 100644 --- a/clients/urwid/main.py +++ b/clients/urwid/main.py @@ -46,7 +46,7 @@ def get_arg(key, default=None, get_value=True): return value try: - network = BBJ(get_arg("host", "127.0.0.1"), get_arg("port", 7099)) + network = BBJ(get_arg("host", "127.0.0.1"), get_arg("port", 7099), get_arg("https", False, False)) except URLError as e: # print the connection error in red exit("\033[0;31m%s\033[0m" % repr(e)) diff --git a/logs/exceptions/996fef24266a11e78aa402e6a9e126c8 b/logs/exceptions/996fef24266a11e78aa402e6a9e126c8 new file mode 100644 index 0000000..2bc229e --- /dev/null +++ b/logs/exceptions/996fef24266a11e78aa402e6a9e126c8 @@ -0,0 +1,7 @@ + File "server.py", line 64, in wrapper + value = function(self, body, connection, user) + File "server.py", line 380, in format_message + formatting.apply_formatting(message, formatter) + File "/home/desvox/BBJ/src/formatting.py", line 183, in apply_formatting + if not msg_obj[x]["send_raw"]: +KeyError('send_raw',) \ No newline at end of file