StarCluster - Mailing List Archive

Re: [Starcluster] plugin __init__

From: Justin Riley <no email>
Date: Thu, 15 Apr 2010 20:02:58 -0400

Hi Dan,

Good catch, fixed in github.

~Justin

On Thursday 15 April 2010 7:23:50 pm Dan Yamins wrote:
> Hi:
>
> It seems that in implementing a plugin, you have to define the __init__
> method, even if your plugin class subclases ClusterSetup. That is, this
> code:
>
>
> from starcluster import clustersetup as sc
>
> class govloveSetup(sc.ClusterSetup):
>
> def run(self, nodes, master, user, user_shell, volumes):
> pass
>
>
> generates an error when starting starcluster, because at some point in the
> code you're doing:
>
> inspect.getargspec(klass.__init__)
>
> If klass.__init__ is not defined, this generates an error since
> klass.__init__ will not be a function (e.g. it will fail the
> inspect.isfunction() test) , instead it is a "slot wrapper."
>
>
> Adding a dummy __init__ solves the problem.
>
>
> Perhaps the base class ClsuterSetup should define a dummy init itself?
>
Received on Thu Apr 15 2010 - 20:03:00 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject