From 297b050f1ebcd75b7a2b7c22aa86b621dbb8bd49 Mon Sep 17 00:00:00 2001 From: lethliel Date: Mon, 8 Jun 2020 15:15:43 +0200 Subject: [PATCH] remove dead opener code The opener is generated but never used. Since commit 95ec7dee7b7284e090b823e4e5ba89f91972d730 --- osc/fetch.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/osc/fetch.py b/osc/fetch.py index 1a70c4e5..6eb22dfa 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -9,11 +9,11 @@ import sys, os try: from urllib.parse import quote_plus - from urllib.request import HTTPBasicAuthHandler, HTTPCookieProcessor, HTTPPasswordMgrWithDefaultRealm, HTTPError + from urllib.request import HTTPError except ImportError: #python 2.x from urllib import quote_plus - from urllib2 import HTTPBasicAuthHandler, HTTPCookieProcessor, HTTPPasswordMgrWithDefaultRealm, HTTPError + from urllib2 import HTTPError from .core import makeurl, streamfile, dgst from .grabber import OscFileGrabber, OscMirrorGroup @@ -43,13 +43,6 @@ class Fetcher: self.cpio = {} self.enable_cpio = enable_cpio - passmgr = HTTPPasswordMgrWithDefaultRealm() - for host in api_host_options: - passmgr.add_password(None, host, api_host_options[host]['user'], - api_host_options[host]['pass']) - openers = (HTTPBasicAuthHandler(passmgr), ) - if cookiejar: - openers += (HTTPCookieProcessor(cookiejar), ) self.gr = OscFileGrabber(progress_obj=self.progress_obj) def __add_cpio(self, pac):