From 87e166ee0676914adc0da23e88bfe26865d610ee Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 28 Feb 2013 19:24:17 +0100 Subject: [PATCH] Remove the urlgrabber fork hack. --- python/pakfire/daemon.py | 2 -- python/pakfire/downloader.py | 11 ----------- python/pakfire/transport.py | 3 --- 3 files changed, 16 deletions(-) diff --git a/python/pakfire/daemon.py b/python/pakfire/daemon.py index 353a46882..59800cfd6 100644 --- a/python/pakfire/daemon.py +++ b/python/pakfire/daemon.py @@ -237,7 +237,6 @@ class PakfireDaemonKeepalive(multiprocessing.Process): # Create connection to the hub. self.transport = transport.PakfireHubTransport(self.config) - self.transport.fork() # Send our profile to the hub. self.send_builder_info() @@ -358,7 +357,6 @@ class PakfireWorker(multiprocessing.Process): # Create connection to the hub. self.transport = transport.PakfireHubTransport(self.config) - self.transport.fork() while self.__running: # Try to get a new build job. diff --git a/python/pakfire/downloader.py b/python/pakfire/downloader.py index 41aa529ac..0b5b5b6a4 100644 --- a/python/pakfire/downloader.py +++ b/python/pakfire/downloader.py @@ -74,17 +74,6 @@ class PakfireGrabber(URLGrabber): URLGrabber.__init__(self, *args, **kwargs) - def fork(self): - """ - Reset Curl object after forking a process. - """ - # XXX this is a very ugly hack and fiddles around with the internals - # or urlgrabber. We should not touch these, but apparently nobody - # else uses multiple threads or processes to talk to their servers. - # So we simply replace Curl with a new instance without closing - # the old one. This should be fixed in urlgrabber and/or pycurl. - urlgrabber.grabber._curl_cache = pycurl.Curl() - def check_offline_mode(self): offline = self.config.get("downloader", "offline") if not offline: diff --git a/python/pakfire/transport.py b/python/pakfire/transport.py index ec836e03e..ca799a3a2 100644 --- a/python/pakfire/transport.py +++ b/python/pakfire/transport.py @@ -193,9 +193,6 @@ class PakfireHubTransport(object): self.config, prefix=self.url, ) - def fork(self): - return self.grabber.fork() - @property def url(self): """ -- 2.39.5