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

🐛 [SambaNAS] diskinfo raises exception when reading MBR Partition table #223

Closed
tr4nt0r opened this issue Apr 7, 2024 · 1 comment
Closed

Comments

@tr4nt0r
Copy link
Contributor

tr4nt0r commented Apr 7, 2024

Addon

SambaNAS

Description

diskinfo 2.1.2 throws an error when reading the partitions of an MBR partition. I already reported it and it was fixed in release 3.1.1

Reproduction steps

Start samba-nas addon

Addon Logs

Traceback (most recent call last):
  File "/usr/local/bin/disklist.py", line 15, in <module>
    plist = d.get_partition_list()
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/diskinfo/disk.py", line 825, in get_partition_list
    result.append(Partition(os.path.basename(path), _read_file(path + "/dev")))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/diskinfo/partition.py", line 116, in __init__
    self.__part_number = int(_read_udev_property(path, "ID_PART_ENTRY_NUMBER="))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''

Addon Config

workgroup: WORKGROUP
username: homeassistant
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - 169.254.0.0/16
  - fe80::/10
  - fc00::/7
automount: true
moredisks:
  - HDD
mountoptions:
  - nosuid
  - relatime
  - noexec
available_disks_log: true
medialibrary:
  enable: true
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
compatibility_mode: false
recyle_bin_enabled: false
wsdd2: false
mqtt_nexgen_entities: false
autodiscovery: {}
other_users: []
acl:
  - share: config
    disabled: true
interfaces: []
password: **********
log_level: warning
enable_smart: true

Architecture

aarch64

OS

HaOS

@dianlight
Copy link
Owner

PR #224 merged and released in 12.2.0-nas2.beta73

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants