Fork from pyparted modified to work with python3