mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
tests-rustthreading.py: the thread is renamed to _thread
Summary: The module no longer exist in Python3, it has been renamed. Reviewed By: quark-zju Differential Revision: D19663426 fbshipit-source-id: a805e7fa3d15335a0be4f6a8d8ae096328470728
This commit is contained in:
parent
9643c72d6e
commit
3545d26208
@ -50,17 +50,23 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
import os
|
||||
import thread
|
||||
import threading
|
||||
import time
|
||||
import unittest
|
||||
from thread import get_ident, start_new_thread
|
||||
|
||||
import silenttestrunner
|
||||
from bindings import threading as rustthreading
|
||||
from hghave import require
|
||||
|
||||
|
||||
try:
|
||||
import thread
|
||||
from thread import get_ident, start_new_thread
|
||||
except ImportError:
|
||||
import _thread as thread
|
||||
from _thread import get_ident, start_new_thread
|
||||
|
||||
|
||||
require(["py2"])
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user