avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rskr...@apache.org
Subject [avro] 21/23: AVRO-2605: Remove Use of Filter Function (#688)
Date Wed, 29 Jan 2020 08:54:40 GMT
This is an automated email from the ASF dual-hosted git repository.

rskraba pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/avro.git

commit 2cfe522b08d07cbdfc037d6dbee3936601483616
Author: Michael A. Smith <michael@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)]


Mime
View raw message