Comment 0 for bug 1597457

Revision history for this message
Alexander Saprykin (cutwater) wrote :

MuranoPL engine doesn't parse correctly signature of __init__ method that is not defined in derived class.

In case of inheritance, when Base class has __init__ method, but Derived class does not have __init__ method, attempt to create Derived class instance fails with exception:

[TypeError]: __init__() takes exactly 2 arguments (1 given)

Example:

class Base(object):

    def __init__(self, this):
        self._owner = this.find_owner('io.murano.Environment')

class Derived(object):
    pass

Workaround:

Define explicit method __init__ in derived class that calls parent's class __init__ method.