[blivet:master 02/10] Give abstract method the same signature as its overriding methods.

Vratislav Podzimek vpodzime at redhat.com
Wed Mar 26 09:28:42 UTC 2014


On Tue, 2014-03-25 at 21:11 +0100, Vratislav Podzimek wrote:
> On Tue, 2014-03-25 at 11:49 -0400, mulhern wrote:
> > ABC metaclass mechanisms do not check the signature of a method, only
> > its name, so this went undetected. It was also benign.
> > 
> > Signed-off-by: mulhern <amulhern at redhat.com>
> > ---
> >  blivet/devicelibs/raid.py | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/blivet/devicelibs/raid.py b/blivet/devicelibs/raid.py
> > index 3d5ea8d..837667f 100644
> > --- a/blivet/devicelibs/raid.py
> > +++ b/blivet/devicelibs/raid.py
> > @@ -189,7 +189,7 @@ class RAIDLevel(object):
> >          return self._get_recommended_stride(member_count)
> >  
> >      @abc.abstractmethod
> > -    def _get_recommended_stride(member_count):
> > +    def _get_recommended_stride(self, member_count):
> >          """Helper function; not to be called directly."""
> >          raise NotImplementedError()
> I'm quite sure there are other patches (8) somewhere, but I see only 01 and 02 which both look good to me. 
The others look good to me as well.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list