Make portdbapi.aux_get() use a PollScheduler instance directly since
authorZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 19:33:07 +0000 (12:33 -0700)
committerZac Medico <zmedico@gentoo.org>
Sun, 5 Sep 2010 19:33:07 +0000 (12:33 -0700)
TaskScheduler isn't really needed.

pym/portage/dbapi/porttree.py

index 793b738c782818bc765b18db43d8c9728adb5a86..0c96b4b4e71694f7fbec881ae327812bec11dc58 100644 (file)
@@ -35,7 +35,7 @@ from portage import _encodings
 from portage import _unicode_encode
 from portage import OrderedDict
 from _emerge.EbuildMetadataPhase import EbuildMetadataPhase
-from _emerge.TaskScheduler import TaskScheduler
+from _emerge.PollScheduler import PollScheduler
 
 import os as _os
 import codecs
@@ -578,15 +578,15 @@ class portdbapi(dbapi):
                                mydata = self._metadata_callback(
                                        mycpv, myebuild, mylocation, {'EAPI':eapi}, emtime)
                        else:
-                               sched = TaskScheduler()
                                proc = EbuildMetadataPhase(cpv=mycpv, ebuild_path=myebuild,
                                        ebuild_mtime=emtime,
                                        metadata_callback=self._metadata_callback, portdb=self,
-                                       repo_path=mylocation, scheduler=sched.sched_iface,
+                                       repo_path=mylocation,
+                                       scheduler=PollScheduler().sched_iface,
                                        settings=self.doebuild_settings)
 
-                               sched.add(proc)
-                               sched.run()
+                               proc.start()
+                               proc.wait()
 
                                if proc.returncode != os.EX_OK:
                                        self._broken_ebuilds.add(myebuild)