From: Michael Tremer Date: Thu, 2 Nov 2017 19:07:36 +0000 (+0100) Subject: http: Remove dependency on constants.py X-Git-Tag: 0.9.28~1285^2~1310 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad46c6cd5c95365e2fdded4ecc7cdb5f2ac510bd;p=pakfire.git http: Remove dependency on constants.py Signed-off-by: Michael Tremer --- diff --git a/src/pakfire/http.py b/src/pakfire/http.py index 457774d8f..d446c3efd 100644 --- a/src/pakfire/http.py +++ b/src/pakfire/http.py @@ -23,6 +23,7 @@ import base64 import hashlib import json import logging +import os.path import shutil import ssl import tempfile @@ -33,13 +34,16 @@ import urllib.request from .ui import progressbar from .config import config -from .constants import * from .i18n import _ from . import errors +from .__version__ import PAKFIRE_VERSION + log = logging.getLogger("pakfire.http") log.propagate = 1 +BUFFER_SIZE = 128 * 1024 # 128kb + # Maximum size of temporary files that is being kept in memory TMP_MAX_SIZE = 10485760 # 10M