]> granicus.if.org Git - clang/commitdiff
Portable Python script across Python version
authorSerge Guelton <sguelton@quarkslab.com>
Thu, 13 Dec 2018 07:42:30 +0000 (07:42 +0000)
committerSerge Guelton <sguelton@quarkslab.com>
Thu, 13 Dec 2018 07:42:30 +0000 (07:42 +0000)
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

tools/scan-view/bin/scan-view

index 1b6e8ba90dfac4b550b976263fc3c422aa5194d3..a3999168f329f7ec7dc8a4edec816d80c26db81b 100755 (executable)
@@ -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)