mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2025-02-15 00:51:28 +01:00
Fixes for some potential int casting issues
This commit is contained in:
parent
ab22fc6afd
commit
9dfb846041
@ -106,10 +106,11 @@ class Disk:
|
|||||||
pr = p_dict["partitions"][pr]
|
pr = p_dict["partitions"][pr]
|
||||||
if pr.get("letter","").upper() == plt.upper():
|
if pr.get("letter","").upper() == plt.upper():
|
||||||
# Found it - set all attributes
|
# Found it - set all attributes
|
||||||
pr["size"] = int(psz)
|
pr["size"] = int(psz) if len(psz) else -1
|
||||||
pr["file system"] = pfs
|
pr["file system"] = pfs
|
||||||
pr["name"] = pnm
|
pr["name"] = pnm
|
||||||
# Also need to set the parent drive's type
|
# Also need to set the parent drive's type
|
||||||
|
if len(ptp):
|
||||||
p_dict["type"] = int(ptp)
|
p_dict["type"] = int(ptp)
|
||||||
break
|
break
|
||||||
return p_disks
|
return p_disks
|
||||||
|
Loading…
Reference in New Issue
Block a user