Updated for proxy server

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2020-02-21 08:34:46 +01:00
parent f621d96ffb
commit d5dc897238
3 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,8 @@
3.8.3 - 17/02/2020 3.8.3 - 21/02/2020
BugFix: BugFix:
- Counting packages for binaries repositories - Counting packages for binaries repositories
Added:
- Feature for proxy servers
3.8.2 - 15/02/2020 3.8.2 - 15/02/2020
Fixed: Fixed:

View file

@ -67,7 +67,8 @@ class Config(Utils):
"SLACKPKG_LOG", "SLACKPKG_LOG",
"ONLY_INSTALLED", "ONLY_INSTALLED",
"EDITOR", "EDITOR",
"NOT_DOWNGRADE" "NOT_DOWNGRADE",
"HTTP_PROXY",
] ]
read_conf = self.read_file(self.config_file) read_conf = self.read_file(self.config_file)
for line in read_conf.splitlines(): for line in read_conf.splitlines():

View file

@ -25,11 +25,14 @@
import os import os
import urllib3 import urllib3
from slpkg.__metadata__ import MetaData as _meta_
class FileSize: class FileSize:
"""Check local or remote file size """Check local or remote file size
""" """
def __init__(self, registry): def __init__(self, registry):
self.meta = _meta_
self.registry = registry self.registry = registry
if self.meta.http_proxy: if self.meta.http_proxy:
self.http = urllib3.ProxyManager(self.meta.http_proxy) self.http = urllib3.ProxyManager(self.meta.http_proxy)