Exemple #1
0
 def __init__(self, url, filename, opts, curl_cache, parent):
     self.curl_cache = curl_cache
     self.parent = parent
     (url, parts) = opts.urlparser.parse(url, opts)
     (scheme, host, path, parm, query, frag) = parts
     opts.find_proxy(url, scheme)
     PyCurlFileObject.__init__(self, str(url), filename, opts)
Exemple #2
0
 def _do_perform(self):
     # WORKAROUND - BZ #1439758 - ensure first item in queue is performed alone to properly setup NSS
     if not self.parent.first_in_queue_done:
         self.parent.first_in_queue_lock.acquire()
         # If some other thread was faster, no need to block anymore
         if self.parent.first_in_queue_done:
             self.parent.first_in_queue_lock.release()
     try:
         PyCurlFileObject._do_perform(self)
     finally:
         if not self.parent.first_in_queue_done:
             self.parent.first_in_queue_done = True
             self.parent.first_in_queue_lock.release()
Exemple #3
0
 def _do_perform(self):
     # WORKAROUND - BZ #1439758 - ensure first item in queue is performed alone to properly setup NSS
     if not self.parent.first_in_queue_done:
         self.parent.first_in_queue_lock.acquire()
         # If some other thread was faster, no need to block anymore
         if self.parent.first_in_queue_done:
             self.parent.first_in_queue_lock.release()
     try:
         PyCurlFileObject._do_perform(self)
     finally:
         if not self.parent.first_in_queue_done:
             self.parent.first_in_queue_done = True
             self.parent.first_in_queue_lock.release()
Exemple #4
0
 def _set_opts(self, opts=None):
     if not opts:
         opts = {}
     PyCurlFileObject._set_opts(self, opts=opts)
     self.curl_obj.setopt(pycurl.FORBID_REUSE, 0) # pylint: disable=E1101
Exemple #5
0
 def __init__(self, url, filename, opts, curl_cache):
     self.curl_cache = curl_cache
     PyCurlFileObject.__init__(self, url, filename, opts)
Exemple #6
0
 def __init__(self, url, filename, opts, curl_cache):
     self.curl_cache = curl_cache
     PyCurlFileObject.__init__(self, url, filename, opts)
Exemple #7
0
 def _set_opts(self, opts=None):
     if not opts:
         opts = {}
     PyCurlFileObject._set_opts(self, opts=opts)
     self.curl_obj.setopt(pycurl.FORBID_REUSE, 0) # pylint: disable=E1101
Exemple #8
0
 def __init__(self, url, filename, opts, curl_cache, parent):
     self.curl_cache = curl_cache
     self.parent = parent
     PyCurlFileObject.__init__(self, url, filename, opts)
Exemple #9
0
 def __init__(self, url, filename, opts, curl_cache, parent):
     self.curl_cache = curl_cache
     self.parent = parent
     PyCurlFileObject.__init__(self, str(url), filename, opts)