Esempio n. 1
0
def version():
    """Return a dict containing the pyparted and libparted versions."""
    from _ped import libparted_version
    from _ped import pyparted_version

    ver = {}
    ver['libparted'] = libparted_version()
    ver['pyparted'] = pyparted_version()
    return ver
def getPartedVersion():
   import parted
   try:
      return float(parted.version()['libparted'])
   except SystemError:
      from _ped import libparted_version
      return float(libparted_version())
   except:
      return 1
Esempio n. 3
0
def version():
    """Return a dict containing the pyparted and libparted versions."""
    from _ped import libparted_version
    from _ped import pyparted_version

    ver = {}
    ver['libparted'] = libparted_version()
    ver['pyparted'] = pyparted_version()
    return ver
 def runTest(self):
     ver = parted.version()
     self.assertEquals(ver['libparted'], _ped.libparted_version())
     self.assertEquals(ver['pyparted'], _ped.pyparted_version())
Esempio n. 5
0
 def runTest(self):
     ver = parted.version()
     self.assertEqual(ver['libparted'], _ped.libparted_version())
     self.assertEqual(ver['pyparted'], _ped.pyparted_version())