A fork of https://tildegit.org/solderpunk/AV-98
Log (Feed) | Files | Refs (Tags) | README | LICENSE

commit ddb3a5a893d8a2a3982991fd38d85912f846dbe3
parent 3562a6db25d519eb153fcc9d6a7ab44b7056fb4a
Author: Solderpunk <solderpunk@sdf.org>
Date:   Wed, 14 Aug 2019 21:16:58 +0300

Detect unsupported schemes.

Mav98.py | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/av98.py b/av98.py @@ -226,6 +226,10 @@ class GeminiClient(cmd.Cmd): sending the request over the network, parsing the response if its a menu, storing the response in a temporary file, choosing and calling a handler program, and updating the history.""" + # Don't try to speak to servers running other protocols + if gi.scheme not in ("gemini", "gopher"): + print("Sorry, no support for " + gi.scheme) + return # Do everything which touches the network in one block, # so we only need to catch exceptions once try: