Fix a typo that broke device detection on Linux

This commit is contained in:
Kovid Goyal 2021-06-25 23:11:03 +05:30
parent fe81410c74
commit ffe2207022
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -493,7 +493,7 @@ class Device(DeviceConfig, DevicePlugin):
node = parts[idx+1] node = parts[idx+1]
try: try:
with open(sz, 'rb') as szf: with open(sz, 'rb') as szf:
exists = szf.read().decode('utf-8') > 0 exists = int(szf.read().decode('utf-8')) > 0
if exists: if exists:
node = self.find_largest_partition(x) node = self.find_largest_partition(x)
ok[node] = True ok[node] = True