subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1547977 - /subversion/trunk/tools/dev/which-error.py
Date Thu, 05 Dec 2013 00:42:35 GMT
Author: breser
Date: Thu Dec  5 00:42:34 2013
New Revision: 1547977

URL: http://svn.apache.org/r1547977
Log:
Better detection of the directory which-error.py is in.

* tools/dev/which-error.py
  (get_errors): Use os.path.realpath(__file__) to allow the command to be
    symlinked to.

Modified:
    subversion/trunk/tools/dev/which-error.py

Modified: subversion/trunk/tools/dev/which-error.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/which-error.py?rev=1547977&r1=1547976&r2=1547977&view=diff
==============================================================================
--- subversion/trunk/tools/dev/which-error.py (original)
+++ subversion/trunk/tools/dev/which-error.py Thu Dec  5 00:42:34 2013
@@ -72,7 +72,8 @@ def get_errors():
   ## errno values.
   errs.update(errno.errorcode)
   ## APR-defined errors, from apr_errno.h.
-  for line in open(os.path.join(os.path.dirname(sys.argv[0]), 'aprerr.txt')):
+  dirname = os.path.dirname(os.path.realpath(__file__))
+  for line in open(os.path.join(dirname, 'aprerr.txt')):
     # aprerr.txt parsing duplicated in gen_base.py:write_errno_table()
     if line.startswith('#'):
        continue



Mime
View raw message