mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2025-04-20 19:17:36 +03:00
Check range is valid before plotting a route
This commit is contained in:
parent
d99a85d279
commit
c707021bee
@ -321,7 +321,12 @@ class SpanshRouter():
|
||||
if ( source and source != self.source_ac.placeholder and
|
||||
dest and dest != self.dest_ac.placeholder ):
|
||||
|
||||
range_ly = float(self.range_entry.get())
|
||||
try:
|
||||
range_ly = float(self.range_entry.get())
|
||||
except ValueError:
|
||||
self.show_error("Invalid range")
|
||||
return
|
||||
|
||||
job_url="https://spansh.co.uk/api/route?"
|
||||
|
||||
results = requests.post(job_url, params={
|
||||
|
Loading…
x
Reference in New Issue
Block a user