summaryrefslogtreecommitdiffstats
path: root/libdimension-python/dimension.pyx
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2012-12-17 16:28:23 -0500
committerTavian Barnes <tavianator@tavianator.com>2012-12-17 16:36:29 -0500
commitc1c2d76ba9ec33fd94a06ba8c698d21bf4e1b774 (patch)
treec71d7e2c2a57a499d09f2dd8baef6595291e4953 /libdimension-python/dimension.pyx
parent9defe68bb518bb7e4c7d6b9954a6f604191b7abd (diff)
downloaddimension-c1c2d76ba9ec33fd94a06ba8c698d21bf4e1b774.tar.xz
client: Respond to ^C right away if possible.
Diffstat (limited to 'libdimension-python/dimension.pyx')
-rw-r--r--libdimension-python/dimension.pyx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdimension-python/dimension.pyx b/libdimension-python/dimension.pyx
index abfa8eb..a50f247 100644
--- a/libdimension-python/dimension.pyx
+++ b/libdimension-python/dimension.pyx
@@ -1,5 +1,5 @@
#########################################################################
-# Copyright (C) 2011 Tavian Barnes <tavianator@tavianator.com> #
+# Copyright (C) 2011-2012 Tavian Barnes <tavianator@tavianator.com> #
# #
# This file is part of The Dimension Python Module. #
# #
@@ -96,6 +96,8 @@ cdef class Future:
return self
def __exit__(self, exc_type, exc_value, traceback):
if self._future != NULL:
+ if exc_value is not None:
+ self.cancel()
self.join()
return False