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:
Serge Guelton 2018-12-13 07:42:30 +00:00
parent a048d58de7
commit b3835de3ee
1 changed files with 2 additions and 2 deletions

View File

@ -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)