]> git.ipfire.org Git - pakfire.git/commitdiff
http: Remove dependency on constants.py
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Nov 2017 19:07:36 +0000 (20:07 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Nov 2017 19:07:36 +0000 (20:07 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/pakfire/http.py

index 457774d8f9518a5e59856bd83349098f64454912..d446c3efd9cec65ffa0ad071f01a1ebc64326387 100644 (file)
@@ -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