[PATCH] D70902: Fix compatibility with python3 of clang-include-fixer.py

Yannack via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 06:31:23 PST 2019


yannack created this revision.
yannack added a reviewer: bkramer.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

clang-include-fixer was recently updated to be python3-compatible.
However, an exception handling clause was improperly using the deprecated `message` property of Exception classes, so the code was not yet entirely python3-compatible.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70902

Files:
  clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py


Index: clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
===================================================================
--- clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
+++ clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py
@@ -211,7 +211,7 @@
     InsertHeaderToVimBuffer(include_fixer_context, text)
     print("Added #include {0} for {1}.".format(selected, symbol))
   except Exception as error:
-    print(error.message, file=sys.stderr)
+    print(error, file=sys.stderr)
   return
 
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70902.231695.patch
Type: text/x-patch
Size: 548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191202/042fc15c/attachment.bin>


More information about the cfe-commits mailing list