[zorg] r324162 - Only print file name in error messages

Chris Matthews via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 2 16:56:41 PST 2018


Author: cmatthews
Date: Fri Feb  2 16:56:41 2018
New Revision: 324162

URL: http://llvm.org/viewvc/llvm-project?rev=324162&view=rev
Log:
Only print file name in error messages

This will help with error deduplication.

Modified:
    zorg/trunk/dep/dep.py

Modified: zorg/trunk/dep/dep.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/dep/dep.py?rev=324162&r1=324161&r2=324162&view=diff
==============================================================================
--- zorg/trunk/dep/dep.py (original)
+++ zorg/trunk/dep/dep.py Fri Feb  2 16:56:41 2018
@@ -26,6 +26,7 @@ import platform
 import re
 import subprocess
 
+import os
 
 try:
     # noinspection PyUnresolvedReferences
@@ -615,7 +616,7 @@ class Line(object):
 
     def __repr__(self):
         """Reconstruct the line for pretty printing."""
-        return "{}:{}: {}{}".format(self.filename,
+        return "{}:{}: {}{}".format(os.path.basename(self.filename),
                                     self.line_number,
                                     self.text,
                                     " # " + self.comment if self.comment else "")




More information about the llvm-commits mailing list