|
|
|
@ -457,7 +457,6 @@ class Distributive(object, SignalInterrupt):
|
|
|
|
|
|
|
|
|
|
def _removeDirectory(self,directory):
|
|
|
|
|
"""Remove directory and files contained in it"""
|
|
|
|
|
#print "removeDirectory:",directory
|
|
|
|
|
try:
|
|
|
|
|
removeDir(directory)
|
|
|
|
|
except Exception, e:
|
|
|
|
@ -973,18 +972,16 @@ class PartitionDistributive(Distributive):
|
|
|
|
|
pipe = Popen([gdiskProg,deviceName],
|
|
|
|
|
stdin=PIPE, stdout=PIPE,stderr=PIPE)
|
|
|
|
|
if devicePartitionCount > 1:
|
|
|
|
|
pipe.stdin.write("t\n%s\n%s\nw\ny\n"%(devicePartitionCount,
|
|
|
|
|
pipe.stdin.write("t\n%s\n%s\nw\ny\n"%(partitionNumber,
|
|
|
|
|
systemid))
|
|
|
|
|
else:
|
|
|
|
|
pipe.stdin.write("t\n%s\nw\ny\n"%systemid)
|
|
|
|
|
pipe.stdin.close()
|
|
|
|
|
pipe.wait()
|
|
|
|
|
print "change id (%s) for %s"%(str(systemid),dev)
|
|
|
|
|
for waittime in (0.1,0.2,0.5,1,2,4):
|
|
|
|
|
if path.exists(dev):
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|
print "Waiting %s..."%waittime
|
|
|
|
|
sleep(waittime)
|
|
|
|
|
raise DistributiveError(
|
|
|
|
|
_("Can not found partition %s after change system id")%dev)
|
|
|
|
|