[Uludag-commits] r16916 - branches/yali4/yali4/gui

uludag-commits at pardus.org.tr uludag-commits at pardus.org.tr
1 Şub 2008 Cum 00:17:15 EET


Author: gokmen.goksel
Date: Fri Feb  1 00:17:15 2008
New Revision: 16916

Modified:
   branches/yali4/yali4/gui/ScrBootloader.py
Log:
* Forget the thread..

Modified: branches/yali4/yali4/gui/ScrBootloader.py
=================================================================
--- branches/yali4/yali4/gui/ScrBootloader.py	(original)
+++ branches/yali4/yali4/gui/ScrBootloader.py	Fri Feb  1 00:17:15 2008
@@ -179,8 +179,6 @@
 
         ctx.mainScreen.processEvents()
 
-        requestThread = ApplyAllRequestThread()
-
         # We should do partitioning operations in here.
 
         # Auto Partitioning
@@ -194,11 +192,15 @@
         # Manual Partitioning
         else:
             ctx.debugger.log("Format Operation Started")
-            requestThread.start()
-            while not ctx.requestsCompleted:
+            for dev in yali4.storage.devices:
                 ctx.mainScreen.processEvents()
-                time.sleep(0.1)
+                dev.commit()
+            # wait for udev to create device nodes
+            time.sleep(2)
+            ctx.mainScreen.processEvents()
+            ctx.partrequests.applyAll()
             ctx.debugger.log("Format Operation Finished")
+            ctx.mainScreen.processEvents()
             self.checkSwap()
 
         root_part_req = ctx.partrequests.searchPartTypeAndReqType(parttype.root,
@@ -236,17 +238,3 @@
     def getDevice(self):
         return self._dev
 
-
-from threading import Thread
-
-class ApplyAllRequestThread(Thread):
-
-    def run(self):
-        # wait..
-        time.sleep(0.01)
-        for dev in yali4.storage.devices:
-            dev.commit()
-        # wait for udev to create device nodes
-        time.sleep(2)
-        ctx.partrequests.applyAll()
-        ctx.requestsCompleted = True


Uludag-commits mesaj listesiyle ilgili daha fazla bilgi