Check eddb.system_name is set before attempting to quote it

urllib.parse.quote does *not* like being passed None.
This commit is contained in:
Athanasius committed 2020-07-01 15:51:14 +01:00
1 parent 6ed7590ba9
commit ad81339495
1 file changed
+4 -1
+4 -1
View File
@@ -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):