summaryrefslogtreecommitdiffstatshomepage
path: root/unix
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-02-15 23:05:38 +1100
committerDamien George <damien.p.george@gmail.com>2017-03-20 15:20:26 +1100
commitc138b21cebfa1a32e9911c1424aa1016c679463b (patch)
tree2fe1b660d6807623c10010893191dd0f9d49512c /unix
parent6e74d24f30bca3fb70876b1fb9a6b3a59850b83c (diff)
downloadmicropython-c138b21cebfa1a32e9911c1424aa1016c679463b.tar.gz
micropython-c138b21cebfa1a32e9911c1424aa1016c679463b.zip
unix: Use mp_handle_pending() in time.sleep().
Diffstat (limited to 'unix')
-rw-r--r--unix/modtime.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/unix/modtime.c b/unix/modtime.c
index 85d1f55327..080d321ee4 100644
--- a/unix/modtime.c
+++ b/unix/modtime.c
@@ -108,9 +108,7 @@ STATIC mp_obj_t mod_time_sleep(mp_obj_t arg) {
if (res != -1 || errno != EINTR) {
break;
}
- if (MP_STATE_VM(mp_pending_exception) != MP_OBJ_NULL) {
- return mp_const_none;
- }
+ mp_handle_pending();
//printf("select: EINTR: %ld:%ld\n", tv.tv_sec, tv.tv_usec);
#else
break;