subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1420102 - /subversion/trunk/build/transform_sql.py
Date Tue, 11 Dec 2012 11:34:58 GMT
Author: danielsh
Date: Tue Dec 11 11:34:57 2012
New Revision: 1420102

URL: http://svn.apache.org/viewvc?rev=1420102&view=rev
Log:
Followup to r1420100: fix building on centos.

* build/transform_sql.py
  (operator.methodcaller): Provide a local implementation if a library
     implementation is missing.

Modified:
    subversion/trunk/build/transform_sql.py

Modified: subversion/trunk/build/transform_sql.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/transform_sql.py?rev=1420102&r1=1420101&r2=1420102&view=diff
==============================================================================
--- subversion/trunk/build/transform_sql.py (original)
+++ subversion/trunk/build/transform_sql.py Tue Dec 11 11:34:57 2012
@@ -31,6 +31,13 @@ import re
 import sys
 
 
+# operator.methodcaller doesn't exist in Python 2.5.
+if not hasattr(operator, 'methodcaller'):
+  def methodcaller(method, *args, **kwargs):
+    return lambda x: getattr(x, method)(*args, **kwargs)
+  operator.methodcaller = methodcaller
+  del methodcaller
+
 DEFINE_END = '  ""\n\n'
 
 



Mime
View raw message