Skip to content

ls fails to return content for none root directories #2

@R-Sommer

Description

@R-Sommer

Describe the bug

Method ls raise FileNotFoundError when trying to get other directories than root

To Reproduce

#!/usr/bin/python3 -u

import technisat

ts = technisat.Technisat()

try:
    ts.connect("192.168.1.2", 2376)
except Exception as e:
    print(e)
    exit(1)

print(ts.ls(directory="/recordings"))

ts.disconnect()

quering root directory works as expected

#!/usr/bin/python3 -u

import technisat

ts = technisat.Technisat()

try:
    ts.connect("192.168.1.2", 2376)
except Exception as e:
    print(e)
    exit(1)

print(ts.ls())

ts.disconnect()

Output
{'recordings': {}, 'music': {}, 'pictures': {}, 'video': {}}

BUG hint

Line 145 if d in current_dir fails since current_dir contains an empty dict.

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