You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ko...@apache.org on 2019/10/26 11:50:22 UTC

[avro] branch master updated: AVRO-2605: Remove Use of Filter Function (#688)

This is an automated email from the ASF dual-hosted git repository.

kojiromike pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/master by this push:
     new 5cf2361  AVRO-2605: Remove Use of Filter Function (#688)
5cf2361 is described below

commit 5cf2361bbe0369e7efcfee4b8874e71c50641a0f
Author: Michael A. Smith <mi...@smith-li.com>
AuthorDate: Sat Oct 26 07:50:14 2019 -0400

    AVRO-2605: Remove Use of Filter Function (#688)
---
 lang/py/test/set_avro_test_path.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lang/py/test/set_avro_test_path.py b/lang/py/test/set_avro_test_path.py
index fd395da..29b666c 100644
--- a/lang/py/test/set_avro_test_path.py
+++ b/lang/py/test/set_avro_test_path.py
@@ -35,13 +35,10 @@ build of AVRO is higher on the path then any installed eggs.
 
 from __future__ import absolute_import, division, print_function
 
-import os
+import os.path
 import sys
 
-# determine the build directory and then make sure all paths that start with the
+# Make sure all paths that start with the
 # build directory are at the top of the path
-builddir=os.path.split(os.path.split(__file__)[0])[0]
-bpaths=filter(lambda s:s.startswith(builddir), sys.path)
-
-for p in bpaths:
-  sys.path.insert(0,p)
+builddir = os.path.dirname(os.path.dirname(__file__))
+sys.path[:0] = [p for p in sys.path if p.startswith(builddir)]