fix pop empty error [build rs fix] [page skip]
This commit is contained in:
parent
84e7c9b5df
commit
77afc037a5
@ -44,6 +44,7 @@ class Console(Options):
|
||||
name = 'python stdin console'
|
||||
|
||||
running: bool = False
|
||||
caches: List[str] = []
|
||||
|
||||
@new_thread('python console', daemon=True, log_thread=True)
|
||||
def main(self):
|
||||
@ -59,14 +60,13 @@ class Console(Options):
|
||||
|
||||
def start(self):
|
||||
self.running = True
|
||||
self.caches: List[str] = []
|
||||
self.main()
|
||||
|
||||
def stop(self):
|
||||
self.running = False
|
||||
|
||||
def get_command(self) -> str:
|
||||
return self.caches.pop(0)
|
||||
def get_command(self) -> Optional[str]:
|
||||
return self.caches.pop(0) if self.caches else None
|
||||
|
||||
|
||||
class Game(Options):
|
||||
|
Loading…
Reference in New Issue
Block a user