Update atlas_builder.py and command_line.py

This commit is contained in:
Richard Bronkhorst 2023-06-12 11:13:06 +02:00
parent 20fb0b86f3
commit 849964b659
2 changed files with 13 additions and 3 deletions

View File

@ -9,7 +9,10 @@ class AtlasBuilder:
self.stop_auto = False
def wait_for_stop(self):
try:
input()
except EOFError:
pass
self.stop_auto = True
print('stopping...')
@ -39,7 +42,6 @@ class AtlasBuilder:
break
r = self.api.list_waypoints(s)
self.all_specials(r)
self.store.flush()
sleep(0.5)

View File

@ -43,6 +43,9 @@ class CommandLine:
def after_cmd(self):
pass
def handle_eof(self):
print('EOF')
def do_quit(self):
print('byebye!')
self.stopping = True
@ -75,6 +78,11 @@ class CommandLine:
def run(self):
while not self.stopping and not self.reloading:
c = input(self.prompt())
p = self.prompt()
try:
c = input(p)
except EOFError:
self.handle_eof()
break
self.handle_cmd(c)