From 856277bc4d9643f0c8a997e5c4895125db166755 Mon Sep 17 00:00:00 2001 From: Maksim Andrianov Date: Mon, 14 Jan 2019 11:27:36 +0300 Subject: [PATCH] Review fixes --- indexer/ftypes_matcher.hpp | 8 ++++---- tools/python/descriptions_downloader.py | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index 150e3b4b9b..c9e7fa6d87 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -202,12 +202,12 @@ public: template bool NeedFeature(Ft & feature) const { - bool need = true; + bool need = false; feature.ForEachType([&](uint32_t type) { - if (need && IsMatched(type)) - need = false; + if (!need && IsMatched(type)) + need = true; }); - return !need; + return need; } }; diff --git a/tools/python/descriptions_downloader.py b/tools/python/descriptions_downloader.py index bbf2993e8f..071cd41596 100644 --- a/tools/python/descriptions_downloader.py +++ b/tools/python/descriptions_downloader.py @@ -61,7 +61,8 @@ def try_get(obj, prop): except KeyError: raise GettingError(f"Getting {prop} field failed. {prop} not found.") - raise GettingError(f"Getting {prop} field failed. Attempts are spent.") + raise GettingError(f"Getting {prop} field failed. " + f"All {REQUEST_ATTEMPTS} attempts are spent") def read_popularity(path):