Do not fail on req/prov strings ending with '[=='

This commit is contained in:
Denis Silakov 2017-03-13 12:59:53 +03:00
parent 3debe8129f
commit b9911a0845

View file

@ -132,6 +132,8 @@ class NEVR(object):
@staticmethod @staticmethod
def from_depstring(s, DE_toremove=None): def from_depstring(s, DE_toremove=None):
s = s.replace('[*]', '') s = s.replace('[*]', '')
# We may have buggy strings ending with "[== "
s = re.sub(r"\[==\s*$", "", s)
if DE_toremove: if DE_toremove:
res = NEVR.re_dep_ver.match(s) res = NEVR.re_dep_ver.match(s)