[Starcluster] plugin __init__

Justin Riley jtriley at MIT.EDU
Thu Apr 15 20:02:58 EDT 2010


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?
> 



More information about the StarCluster mailing list