/[gli]/trunk/src/GLIStorageDevice.py
Gentoo

Diff of /trunk/src/GLIStorageDevice.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1037 Revision 1038
56 self._parted_dev = parted.PedDevice.get(self._device) 56 self._parted_dev = parted.PedDevice.get(self._device)
57 try: 57 try:
58 self._parted_disk = parted.PedDisk.new(self._parted_dev) 58 self._parted_disk = parted.PedDisk.new(self._parted_dev)
59 except: 59 except:
60 self._parted_disk = self._parted_dev.disk_new_fresh(parted.disk_type_get(archinfo[self._arch]['disklabel'])) 60 self._parted_disk = self._parted_dev.disk_new_fresh(parted.disk_type_get(archinfo[self._arch]['disklabel']))
61 self._disklabel = self._parted_disk.type.name 61 self._disklabel = self._parted_disk.type.name
62 else:
63 self._disklabel = archinfo[self._arch]['disklabel']
62 if set_geometry: 64 if set_geometry:
63 self.set_disk_geometry_from_disk() 65 self.set_disk_geometry_from_disk()
64 66
65 ## 67 ##
66 # Sets disk geometry info from disk. This function is used internally by __init__() 68 # Sets disk geometry info from disk. This function is used internally by __init__()
327 return 0 329 return 0
328 330
329 ## 331 ##
330 # Returns the drive model 332 # Returns the drive model
331 def get_model(self): 333 def get_model(self):
334 if self._local_device:
332 return self._parted_dev.model 335 return self._parted_dev.model
336 else:
337 return "Generic disk"
333 338
334 ## 339 ##
335 # Sets the disklabel type 340 # Sets the disklabel type
336 def set_disklabel(self, disklabel): 341 def set_disklabel(self, disklabel):
337 self._disklabel = disklabel 342 self._disklabel = disklabel

Legend:
Removed from v.1037  
changed lines
  Added in v.1038

  ViewVC Help
Powered by ViewVC 1.1.20