mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
Apply Python 3 futurize transform libmodernize.fixes.fix_raise_six.
This commit is contained in:
@@ -4,6 +4,7 @@ import sys
|
|||||||
import time
|
import time
|
||||||
import ctypes
|
import ctypes
|
||||||
import threading
|
import threading
|
||||||
|
import six
|
||||||
|
|
||||||
# Based on http://code.activestate.com/recipes/483752/
|
# Based on http://code.activestate.com/recipes/483752/
|
||||||
|
|
||||||
@@ -79,5 +80,5 @@ def timeout(timeout, func, *args, **kwargs):
|
|||||||
if thread.exc_info:
|
if thread.exc_info:
|
||||||
# Raise the original stack trace so our error messages are more useful.
|
# Raise the original stack trace so our error messages are more useful.
|
||||||
# from http://stackoverflow.com/a/4785766/90777
|
# from http://stackoverflow.com/a/4785766/90777
|
||||||
raise thread.exc_info[0], thread.exc_info[1], thread.exc_info[2]
|
six.reraise(thread.exc_info[0], thread.exc_info[1], thread.exc_info[2])
|
||||||
return thread.result
|
return thread.result
|
||||||
|
|||||||
Reference in New Issue
Block a user