On Wed, 2009-11-04 at 09:28 -0500, Chris Lumens wrote: > > > > +def sectorsToSize(sectors, sectorSize): > > > > + """ Convert length in sectors to size in MB. > > > > + > > > > + Arguments: > > > > + > > > > + sectors - sector count > > > > + sectorSize - sector size for the device, in bytes > > > > + """ > > > > + return (sectors * sectorSize) / (1024.0 * 1024.0) > > parted.Device has a getSize() method that already covers this one. You > can even pass it a unit to return the size in, MB by default. parted.Device.getSize returns the size of the entire device -- we need to be able to convert an arbitrary number of sectors to a size. Dave _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list