forked from OSchip/llvm-project
Portable Python script across Python version
Use higher-level and more compatible threading module to start a new thread. Differential Revision: https://reviews.llvm.org/D55259 llvm-svn: 349008
This commit is contained in:
parent
a048d58de7
commit
b3835de3ee
|
@ -7,7 +7,7 @@ import sys
|
|||
import imp
|
||||
import os
|
||||
import posixpath
|
||||
import thread
|
||||
import threading
|
||||
import time
|
||||
import urllib
|
||||
import webbrowser
|
||||
|
@ -135,7 +135,7 @@ def main():
|
|||
# Kick off thread to wait for server and start web browser, if
|
||||
# requested.
|
||||
if args.startBrowser:
|
||||
t = thread.start_new_thread(start_browser, (port, args))
|
||||
threading.Thread(target=start_browser, args=(port, args)).start()
|
||||
|
||||
run(port, args, args.root)
|
||||
|
||||
|
|
Loading…
Reference in New Issue