Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SMART status to disk infos #2046

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

christophehenry
Copy link
Contributor

Rel: YunoHost/issues#1823

So this one may be a bit controversial since it rewrite the D-Bus part using sdbus-python which is not yet bundled in Debian. I think, however using sdbus-python will have a positive effect on code since it D-Bus proxies are plain Python classes which improves code expressiveness and API discovery.

- Also rewrite API using sdbus-python
import dbus
from sdbus import sd_bus_open_system, DbusInterfaceCommon

Check notice

Code scanning / CodeQL

Unused import Note

Import of 'DbusInterfaceCommon' is not used.
),
key=lambda item: item[1]["SortKey"],
)
UDISK_DRIVE_ATA_IFC = "org.freedesktop.UDisks2.Drive.Ata"

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'UDISK_DRIVE_ATA_IFC' is not used.
key=lambda item: item[1]["SortKey"],
)
UDISK_DRIVE_ATA_IFC = "org.freedesktop.UDisks2.Drive.Ata"
UDISK_DRIVE_NVME_IFC = "org.freedesktop.UDisks2.Manager.NVMe"

Check notice

Code scanning / CodeQL

Unused global variable Note

The global variable 'UDISK_DRIVE_NVME_IFC' is not used.
UNKNOWN = enum.auto()

@staticmethod
def parse(status: str | None):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error as implicit returns always return None.
raise NotImplementedError


class AtaDisk(Disk, AtaController): ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
class AtaDisk(Disk, AtaController): ...


class NvmeDisk(Disk, NVMeController): ...

Check notice

Code scanning / CodeQL

Statement has no effect Note

This statement has no effect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant