get swap size

shrink partitions
pep8 fixes