Skip to content

USE_AUTOCONNECT WSL check fail due to str case #231

@andyrids

Description

@andyrids

USE_AUTOCONNECT = sys.platform == 'linux' and 'Microsoft' not in platform.uname().release

I am using a manual install of Alpine Linux (minimal root filesystem) on WSL2 and on my system, platform.uname().release gives the string '5.15.153.1-microsoft-standard-WSL2', which has a lowercase 'microsoft'.

As a result, the above code at main.py fails the second part of the test:

'Microsoft' not in platform.uname().release

As a result, autoconnect runs and an error is raised due to missing udev library.

I changed 'Microsoft' to lowercase and rshell connected fine. I don't know whether this is a nuance of my custom install.

Something like the following might help:

USE_AUTOCONNECT = sys.platform == 'linux' and 'microsoft' not in platform.uname().release.lower()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions