Commits

M0E-lnx  committed 37e488a

Fix last commit

  • Participants
  • Parent commits 8dbc2ec

Comments (0)

Files changed (4)

       url='https://bitbucket.org/VLCore/vinstall/',
       packages=['vinstall', 'vinstall.core', 'vinstall.ui', 'vinstall.backend',
           'vinstall.controller'],
-      data_files=[("/usr/share/pixmaps", ["resources/logo.png"])],
       entry_points={
           'console_scripts': [
               'vinstall = vinstall.installer:main',]}

File vinstall/backend/media.py

 
         return self._disk.device.model
 
+    def free_space(self, units="MB"):
+        """Return the ammount of free space available in units specified"""
+        return self._disk.usable_free_space.to(units)
+
     def size(self, unit="GB"):
         """ Returns disk size, by default in GB, unit can be GB or MB
 

File vinstall/backend/partitioning.py

         """
         self.disk = disk._disk
 
-    @classmethod
-    def free_space(self, units="MB"):
-        """Return how much free space is left on the device"""
-        return self.disk.usable_free_space.to(units)
-
     def create_partition_table(self, table_type="msdos"):
         """ Create the partition table on the disk.
         This is only necessary when using a fresh disk that has

File vinstall/controller/automatic.py

         #root_size = disk_size - swap_size
         partitioner = partitioning.DiskPartitioner(disk)
         partitioner.delete_all_partitions()
-        root_size = disk.free_space("MB") - swapsize
+        root_size = disk.free_space("MB") - swap_size
         partitioner.add_partition(size_mb = root_size)
         # Read how much space is left on the device.
         swap_size = disk.free_space("MB")