[PATCH] D131789: [clang-format][NFC] Rewrite prints in python3 compatible way

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 25 13:41:40 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG015ce15ea27b: [clang-format][NFC] Rewrite prints in python3 compatible way (authored by eoanermine, committed by owenpan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131789/new/

https://reviews.llvm.org/D131789

Files:
  clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py


Index: clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
===================================================================
--- clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
+++ clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
@@ -39,7 +39,7 @@
   result = './'
   while not os.path.isfile(os.path.join(result, path)):
     if os.path.realpath(result) == '/':
-      print 'Error: could not find compilation database.'
+      print('Error: could not find compilation database.')
       sys.exit(1)
     result += '../'
   return os.path.realpath(result)
@@ -49,7 +49,7 @@
   """Merge all symbol files (yaml) in a given directory into a single file."""
   invocation = [args.binary, '-merge-dir='+directory, args.saving_path]
   subprocess.call(invocation)
-  print 'Merge is finished. Saving results in ' + args.saving_path
+  print('Merge is finished. Saving results in ' + args.saving_path)
 
 
 def run_find_all_symbols(args, tmpdir, build_path, queue):
@@ -118,7 +118,7 @@
   except KeyboardInterrupt:
     # This is a sad hack. Unfortunately subprocess goes
     # bonkers with ctrl-c and we start forking merrily.
-    print '\nCtrl-C detected, goodbye.'
+    print('\nCtrl-C detected, goodbye.')
     os.kill(0, 9)
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131789.462761.patch
Type: text/x-patch
Size: 1334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220925/857f749d/attachment-0001.bin>


More information about the cfe-commits mailing list