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
|
self.stop_auto = False
|
||||||
|
|
||||||
def wait_for_stop(self):
|
def wait_for_stop(self):
|
||||||
input()
|
try:
|
||||||
|
input()
|
||||||
|
except EOFError:
|
||||||
|
pass
|
||||||
self.stop_auto = True
|
self.stop_auto = True
|
||||||
print('stopping...')
|
print('stopping...')
|
||||||
|
|
||||||
@ -39,7 +42,6 @@ class AtlasBuilder:
|
|||||||
break
|
break
|
||||||
r = self.api.list_waypoints(s)
|
r = self.api.list_waypoints(s)
|
||||||
self.all_specials(r)
|
self.all_specials(r)
|
||||||
self.store.flush()
|
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,6 +43,9 @@ class CommandLine:
|
|||||||
def after_cmd(self):
|
def after_cmd(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def handle_eof(self):
|
||||||
|
print('EOF')
|
||||||
|
|
||||||
def do_quit(self):
|
def do_quit(self):
|
||||||
print('byebye!')
|
print('byebye!')
|
||||||
self.stopping = True
|
self.stopping = True
|
||||||
@ -75,6 +78,11 @@ class CommandLine:
|
|||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while not self.stopping and not self.reloading:
|
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)
|
self.handle_cmd(c)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user