[Libosinfo] [osinfo-db PATCH 1/2] tests: get the release/EOL dates

Fabiano Fidêncio fidencio at redhat.com
Tue May 21 12:36:49 UTC 2019


On Tue, 2019-05-21 at 14:30 +0200, Fabiano Fidêncio wrote:
> On Tue, 2019-05-21 at 14:01 +0200, Pino Toscano wrote:
> > ---
> >  tests/osinfo.py | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> > 
> > diff --git a/tests/osinfo.py b/tests/osinfo.py
> > index 3585f44..20c1866 100644
> > --- a/tests/osinfo.py
> > +++ b/tests/osinfo.py
> > @@ -137,6 +137,14 @@ class Os(_XMLBase):
> >      def get_network_install_resources(self, node):
> >          return self._get_resources(node, 'network-install')
> >  
> > +    @_cache_property
> > +    def release_date(self):
> > +        return self._get_text('release-date')
> 
> Here I'd just do: `return self._get_text('release-date') or None`, as
> it may help in the next patch
> 
> > +
> > +    @_cache_property
> > +    def eol_date(self):
> > +        return self._get_text('eol-date')
> 
> Same here.
> 
> > +
> >  
> >  class Resources(_XMLBase):
> >      @_cache_property

Nevermind about those. _get_text() already returns None in case the
attribute is not found.

So, for this one, Reviewed-by: Fabiano Fidêncio <fidencio at redhat.com>




More information about the Libosinfo mailing list