From: Serge Guelton Date: Thu, 13 Dec 2018 07:42:30 +0000 (+0000) Subject: Portable Python script across Python version X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ff5810201ee1a5e95b55a8ac97f9070ebf64cf9;p=clang 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349008 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/scan-view/bin/scan-view b/tools/scan-view/bin/scan-view index 1b6e8ba90d..a3999168f3 100755 --- a/tools/scan-view/bin/scan-view +++ b/tools/scan-view/bin/scan-view @@ -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)