Closed axce1 closed 8 years ago
add patch
From fdfb631113ff29466f1ca56306cfeef4b6bfb1fb Mon Sep 17 00:00:00 2001
From: axcel <axce1.github@gmail.com>
Date: Thu, 26 May 2016 11:36:49 +0500
Subject: [PATCH] ifilter for py3
---
bowerer/manager.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/bowerer/manager.py b/bowerer/manager.py
index d0499ac..41761c9 100644
--- a/bowerer/manager.py
+++ b/bowerer/manager.py
@@ -1,7 +1,11 @@
from os.path import join
-from itertools import ifilter
from functools import cmp_to_key
+try:
+ from itertools import ifilter as filter
+except ImportError:
+ pass
+
from semantic_version import compare as v_compare, match as v_match
@@ -213,5 +217,5 @@ class Manager(object):
return True
- filtered = ifilter(func_filter, [(idx, endpoint) for idx, endpoint in enumerate(endpoints)])
+ filtered = filter(func_filter, [(idx, endpoint) for idx, endpoint in enumerate(endpoints)])
return list(filtered) # todo
--
2.8.1
Thank you. Could you please fork the repo and create a pull request?
yep