mirror of
https://github.com/jtauber/applepy.git
synced 2024-12-27 18:30:19 +00:00
abandon startup if cpu module does not start
This commit is contained in:
parent
15e174c02a
commit
9f09818aa0
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
import numpy
|
import numpy
|
||||||
import pygame
|
import pygame
|
||||||
|
import select
|
||||||
import socket
|
import socket
|
||||||
import struct
|
import struct
|
||||||
import subprocess
|
import subprocess
|
||||||
@ -374,6 +375,10 @@ class Apple2:
|
|||||||
])
|
])
|
||||||
self.core = subprocess.Popen(args)
|
self.core = subprocess.Popen(args)
|
||||||
|
|
||||||
|
rs, _, _ = select.select([listener], [], [], 2)
|
||||||
|
if not rs:
|
||||||
|
print >>sys.stderr, "CPU module did not start"
|
||||||
|
sys.exit(1)
|
||||||
self.cpu, _ = listener.accept()
|
self.cpu, _ = listener.accept()
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user