Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-06-09 21:30:17 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-06-09 21:30:17 +0200
commitf00e9ee9e374da0e566d296a5db524121e344739 (patch)
tree7005571ba86b6373f3fc4e20ebc3f98e0097c3ce /archinstall.py
parent92e71cf59990e328334ad16232c184a4fabf91a1 (diff)
Fixed size debug information. Apparently that comes part of lsblk.. heh
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/archinstall.py b/archinstall.py
index a86a9a04..a506d97e 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -290,7 +290,8 @@ def device_state(name):
def grab_partitions(dev):
drive_name = os.path.basename(dev)
parts = oDict()
- o = b''.join(sys_command('/usr/bin/lsblk -o name -J -b {dev}'.format(dev=dev)).exec())
+ #o = b''.join(sys_command('/usr/bin/lsblk -o name -J -b {dev}'.format(dev=dev)).exec())
+ o = b''.join(sys_command('/usr/bin/lsblk -J {dev}'.format(dev=dev)).exec())
if b'not a block device' in o:
## TODO: Replace o = sys_command() with code, o = sys_command()
## and make sys_command() return the exit-code, way safer than checking output strings :P
@@ -303,10 +304,11 @@ def grab_partitions(dev):
r = json.loads(o.decode('UTF-8'))
if len(r['blockdevices']) and 'children' in r['blockdevices'][0]:
for part in r['blockdevices'][0]['children']:
- size = os.statvfs(dev + part['name'][len(drive_name):])
+ #size = os.statvfs(dev + part['name'][len(drive_name):])
parts[part['name'][len(drive_name):]] = {
- 'size' : size.f_frsize * size.f_bavail,
- 'blocksize' : size.f_frsize * size.f_blocks
+ #'size' : size.f_frsize * size.f_bavail,
+ #'blocksize' : size.f_frsize * size.f_blocks
+ 'size' : part['size']
}
return parts