MuranoPL does not handle properly derived class without __init__ method.

Bug #1597456 reported by Alexander Saprykin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
New
Undecided
Unassigned

Bug Description

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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.