On Mon, Dec 11, 2017 at 10:14:51AM +0100, Jan Tluka wrote:
Mon, Dec 11, 2017 at 09:41:46AM CET, olichtne(a)redhat.com wrote:
>+"""
>+Module that calculates the LNST version based on the currently checked-out git
>+commit. Overrides the default LNST version that is reported when LNST is
>+installed on the machine with setup.py which skips this module.
>+
>+Copyright 2017 Red Hat, Inc.
>+Licensed under the GNU General Public License, version 2 as
>+published by the Free Software Foundation; see COPYING for details.
>+"""
>+
>+__autor__ = """
^ autHor ?
good catch... I normally just copy this from an existing module and edit
the description - I checked and this error is present in several Common
modules, I'll send a separate patch that fixes these...
>+ @property
>+ def is_git_version(self):
>+ return git_version is not None
I'm not an expert on @property use, but can a method be a property? What's
the purpose here?
yeah, @property is actually intended to work only with methods - instead
of having a private atttribute and a getter that somehow calculates it's
value (more than just return a single value) you define the method and
use the @property decorator and therefore define the "attribute" and
it's getter all in one.
Thanks for the review.
-Ondrej