-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
base: dev
Are you sure you want to change the base?
Add SMART status to disk infos #2046
Conversation
- Also rewrite API using sdbus-python
7e61308
to
9eee442
Compare
import dbus | ||
from sdbus import sd_bus_open_system, DbusInterfaceCommon |
Check notice
Code scanning / CodeQL
Unused import Note
), | ||
key=lambda item: item[1]["SortKey"], | ||
) | ||
UDISK_DRIVE_ATA_IFC = "org.freedesktop.UDisks2.Drive.Ata" |
Check notice
Code scanning / CodeQL
Unused global variable Note
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
UNKNOWN = enum.auto() | ||
|
||
@staticmethod | ||
def parse(status: str | None): |
Check notice
Code scanning / CodeQL
Explicit returns mixed with implicit (fall through) returns Note
raise NotImplementedError | ||
|
||
|
||
class AtaDisk(Disk, AtaController): ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
class AtaDisk(Disk, AtaController): ... | ||
|
||
|
||
class NvmeDisk(Disk, NVMeController): ... |
Check notice
Code scanning / CodeQL
Statement has no effect Note
3662863
to
7968937
Compare
7968937
to
8ee3ff7
Compare
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 usingsdbus-python
will have a positive effect on code since it D-Bus proxies are plain Python classes which improves code expressiveness and API discovery.