On Tue, Aug 17, 2010 at 8:39 PM, Richard Shaw <[email protected]> wrote:
> I didn't get a chance to review the pyparted doc but here's the
> updated script. It's completely untested but the framework is there.


I'm not sure I'm understanding this module well.
Says device = parted.Device(path="/dev/sdb") has no attribute
getPedPartition()

I wonder what getPedPartition is supposed to be.

[r...@localhost tmp]# ./partition.py
Traceback (most recent call last):
  File "./partition.py", line 14, in <module>
    part = d.addPartition(disk, device)
  File "<string>", line 2, in addPartition
  File "/usr/lib/python2.6/site-packages/parted/decorators.py", line
31, in localeC
    ret = fn(*args, **kwds)
  File "/usr/lib/python2.6/site-packages/parted/disk.py", line 250, in
addPartition
    result = self.__disk.add_partition(partition.getPedPartition())
AttributeError: 'Device' object has no attribute 'getPedPartition'
[r...@localhost tmp]# cat partition.py
#!/usr/bin/python

import os
import sys
import parted



device = parted.Device(path="/dev/sdb")
disk = parted.Disk(device=device)


d = parted.Disk
part = d.addPartition(disk, device)
disk.commit()

[r...@localhost tmp]#
--
livecd mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/livecd

Reply via email to