]> git.sur5r.net Git - u-boot/blobdiff - test/py/u_boot_spawn.py
ARM: at91: sama5d2: configure the L2 cache memory
[u-boot] / test / py / u_boot_spawn.py
index 3d9cde5ee0d063dcbd98384ce04a58cf8e1483ee..a5f4a8e91baed1aa8c9f3dce7c0072fc28ca13da 100644 (file)
@@ -56,8 +56,12 @@ class Spawn(object):
             finally:
                 os._exit(255)
 
-        self.poll = select.poll()
-        self.poll.register(self.fd, select.POLLIN | select.POLLPRI | select.POLLERR | select.POLLHUP | select.POLLNVAL)
+        try:
+            self.poll = select.poll()
+            self.poll.register(self.fd, select.POLLIN | select.POLLPRI | select.POLLERR | select.POLLHUP | select.POLLNVAL)
+        except:
+            self.close()
+            raise
 
     def kill(self, sig):
         """Send unix signal "sig" to the child process.