Update atlas_builder.py and command_line.py
This commit is contained in:
parent
20fb0b86f3
commit
849964b659
@ -9,7 +9,10 @@ class AtlasBuilder:
|
||||
self.stop_auto = False
|
||||
|
||||
def wait_for_stop(self):
|
||||
input()
|
||||
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)
|
||||
|
||||
|
||||
|
@ -42,6 +42,9 @@ class CommandLine:
|
||||
|
||||
def after_cmd(self):
|
||||
pass
|
||||
|
||||
def handle_eof(self):
|
||||
print('EOF')
|
||||
|
||||
def do_quit(self):
|
||||
print('byebye!')
|
||||
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user