Review fixes

This commit is contained in:
Maksim Andrianov 2019-01-14 11:27:36 +03:00 committed by mpimenov
parent 4fa6e915bf
commit 856277bc4d
2 changed files with 6 additions and 5 deletions

View file

@ -202,12 +202,12 @@ public:
template <typename Ft>
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;
}
};

View file

@ -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):