From ad81339495a40c2ceab6604127ef855f8d4f8ced Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 27 Jun 2020 10:45:00 +0100 Subject: [PATCH] Check eddb.system_name is set before attempting to quote it urllib.parse.quote does *not* like being passed None. --- plugins/eddb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/eddb.py b/plugins/eddb.py index 2efce6dd..7ef3fda4 100644 --- a/plugins/eddb.py +++ b/plugins/eddb.py @@ -28,7 +28,10 @@ with open(join(config.respath, 'stations.p'), 'rb') as h: # Main window clicks def system_url(system_name): - return 'https://eddb.io/system/name/%s' % urllib.parse.quote(system_name) + if system_name: + return 'https://eddb.io/system/name/%s' % urllib.parse.quote(system_name) + else: + return '' def station_url(system_name, station_name):