Skip to content

Why BaseDevice class is derived from (pexpect.spawn): #104

@mirafratech

Description

@mirafratech

Hi Matthew/All,
Could someone please help me to understand the below issue in boardfarm framework

I have been going through board farm framework code for a while and found that the BaseDevice class from base.py is inheretied from pexpect.spawn

class BaseDevice(pexpect.spawn):

And when I am trying to remove the inherited base class from my DebainBox class I am facing the below Error

from class DebianBox(base.BaseDevice):
to
class DebianBox():

Error Snippet:
unbound method init() must be called with spawn instance as first argument (got DebianBox instance instead)
Failed to connect to any device

These changes is needed for me to use Paramariko as my connection interactive_tool instead of pexpect to achieve dynamism in using connection modules(like pepxect or paramiko or telenetlib)

Could you please guide me to solve over the problem and Is it possible to make the connection to device independent of the pexpect module.

Thanks a lot ,
Error_log.txt

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