Fix disks reference in purge to reflect disks api change

This commit is contained in:
Thomas S Hatch 2011-04-06 17:19:30 -06:00
parent 9de72d3510
commit 41ed9b8655

View File

@ -392,8 +392,8 @@ def purge(vm_, dirs=False):
destroy(vm_)
directories = set()
for disk in disks:
os.remove(disks[disk])
directories.add(os.path.dirname(disks[disk]))
os.remove(disks[disk]['file'])
directories.add(os.path.dirname(disks[disk]['file']))
if dirs:
for dir_ in directories:
shutil.rmtree(dir_)