diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2012-12-17 16:28:23 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2012-12-17 16:36:29 -0500 |
commit | c1c2d76ba9ec33fd94a06ba8c698d21bf4e1b774 (patch) | |
tree | c71d7e2c2a57a499d09f2dd8baef6595291e4953 /libdimension-python/dimension.pyx | |
parent | 9defe68bb518bb7e4c7d6b9954a6f604191b7abd (diff) | |
download | dimension-c1c2d76ba9ec33fd94a06ba8c698d21bf4e1b774.tar.xz |
client: Respond to ^C right away if possible.
Diffstat (limited to 'libdimension-python/dimension.pyx')
-rw-r--r-- | libdimension-python/dimension.pyx | 4 |
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 |