mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2025-01-22 10:04:12 -05:00
Fixes for some potential int casting issues
This commit is contained in:
parent
ab22fc6afd
commit
9dfb846041
1 changed files with 3 additions and 2 deletions
|
@ -106,10 +106,11 @@ class Disk:
|
|||
pr = p_dict["partitions"][pr]
|
||||
if pr.get("letter","").upper() == plt.upper():
|
||||
# Found it - set all attributes
|
||||
pr["size"] = int(psz)
|
||||
pr["size"] = int(psz) if len(psz) else -1
|
||||
pr["file system"] = pfs
|
||||
pr["name"] = pnm
|
||||
# Also need to set the parent drive's type
|
||||
p_dict["type"] = int(ptp)
|
||||
if len(ptp):
|
||||
p_dict["type"] = int(ptp)
|
||||
break
|
||||
return p_disks
|
||||
|
|
Loading…
Reference in a new issue