1. Michał Górny
  2. smart-live-rebuild

Commits

Michał Górny  committed d5db3b1

Ignore KeyboardInterrupt in parent process when waiting for child output; let the child handle it.

  • Participants
  • Parent commits 741e567
  • Branches master
  • Tags smart-live-rebuild-0.2

Comments (0)

Files changed (1)

File smart-live-rebuild.py

View file
 			os.close(commpipe[1])
 			buf = b''
 			while True:
-				ret = os.read(commpipe[0], 1024)
-				if ret == b'':
-					break
+				try:
+					ret = os.read(commpipe[0], 1024)
+				except KeyboardInterrupt:
+					pass
 				else:
-					buf += ret
+					if ret == b'':
+						break
+					else:
+						buf += ret
 
 			if buf == b'':
 				packages = []