Skip to content

Inherited classes not initialized properly in Python3 when constructor uses super() #921

@ygorelik

Description

@ygorelik

Current Behavior

Inherited classes are not initialized properly in Python3 when constructor uses super().

Example from errors.py:

class YServiceError(YError):
    '''
    Exception for Service Side Validation
    '''
    def __init__(self, error_code=None, error_msg=None):
        super(YServiceError, self).__init__(
            error_code=error_code, error_msg=error_msg)

This code works fine in Python2, but python3 requires different syntax:

class YServiceError(YError):
    '''
    Exception for Service Side Validation
    '''
    def __init__(self, error_code=None, error_msg=None):
        super().__init__(
            error_code=error_code, error_msg=error_msg)

System Information

YDK-0.5.5 and YDK-0.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions