changeset 11:7759069e8655

added error checking
author Atul Varma <avarma@mozilla.com>
date Mon, 31 May 2010 15:02:06 -0700
parents 479e73ddf945
children 92d33cfdf227
files sjsbox/box.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sjsbox/box.py	Mon May 31 14:58:18 2010 -0700
+++ b/sjsbox/box.py	Mon May 31 15:02:06 2010 -0700
@@ -91,6 +91,8 @@
 
     @property
     def status(self):
+        if self.child is None:
+            raise IOError('process is shut down')
         return get_pid_statuses([self.child.pid])[self.child.pid]
 
     def shutdown(self):