summaryrefslogtreecommitdiff
path: root/python/skytools/scripting.py
diff options
context:
space:
mode:
authorMarko Kreen2012-05-22 10:34:34 +0000
committerMarko Kreen2012-05-22 10:34:34 +0000
commitcece3d7e465265be77257cd462bc818be0a161a0 (patch)
tree49f1ebc63ab1d0ebc9d56fa2a9b3ddd389ee70ae /python/skytools/scripting.py
parent698ee471ef5073ae4303eb17d3b8bddc793dbe93 (diff)
skytools.scripting: catch EINTR from sleep()
Diffstat (limited to 'python/skytools/scripting.py')
-rw-r--r--python/skytools/scripting.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/skytools/scripting.py b/python/skytools/scripting.py
index d1544ced..ad67ef26 100644
--- a/python/skytools/scripting.py
+++ b/python/skytools/scripting.py
@@ -598,7 +598,11 @@ class BaseScript(object):
def sleep(self, secs):
"""Make script sleep for some amount of time."""
- time.sleep(secs)
+ try:
+ time.sleep(secs)
+ except IOError, ex:
+ if ex.errno != errno.EINTR:
+ raise
def exception_hook(self, det, emsg):
"""Called on after exception processing.