Display-If-Installed already supported EAPI 5 atoms.
Use fnmatch for wildcard support on Display-If-Profile.
---
 pym/portage/news.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/news.py b/pym/portage/news.py
index 177f9db..d6d2f07 100644
--- a/pym/portage/news.py
+++ b/pym/portage/news.py
@@ -271,7 +271,7 @@ class NewsItem(object):
                        # will never match
                        format_match = _formatRE.match(line)
                        if (format_match is not None and
-                                       not 
fnmatch.fnmatch(format_match.group(1), '1.*')):
+                                       not 
fnmatch.fnmatch(format_match.group(1), '[12].*')):
                                invalids.append((i + 1, line.rstrip('\n')))
                                break
                        if not line.startswith('D'):
@@ -325,7 +325,7 @@ class DisplayProfileRestriction(DisplayRestriction):
                self.profile = profile
 
        def checkRestriction(self, **kwargs):
-               if self.profile == kwargs['profile']:
+               if fnmatch.fnmatch(kwargs['profile'], self.profile):
                        return True
                return False
 
-- 
2.9.3


Reply via email to