Broken project to implement a cross-protocol browser in textual
Diffstat (limited to 'protocol/gemini.py')
| -rw-r--r-- | protocol/gemini.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocol/gemini.py b/protocol/gemini.py index b4cccbe..05f86ce 100644 --- a/protocol/gemini.py +++ b/protocol/gemini.py @@ -25,8 +25,8 @@ class GeminiProtocol(): s = context.wrap_socket(s, server_hostname = hostname) s.sendall((url + '\r\n').encode("UTF-8")) fp = s.makefile("rb") - except: - return ("text/error",["error"]) + except Exception as e: + return ("text/error",["error\n", str(e)]) header = fp.readline() header = header.decode("UTF-8").strip() if header[0:1] == "2": |