avoid circular import in util.py
This commit is contained in:
@@ -22,7 +22,7 @@ import itertools
|
|||||||
import urllib.parse
|
import urllib.parse
|
||||||
from http.cookiejar import Cookie
|
from http.cookiejar import Cookie
|
||||||
from email.utils import mktime_tz, parsedate_tz
|
from email.utils import mktime_tz, parsedate_tz
|
||||||
from . import text, formatter, exception
|
from . import text, exception
|
||||||
|
|
||||||
|
|
||||||
def bencode(num, alphabet="0123456789"):
|
def bencode(num, alphabet="0123456789"):
|
||||||
@@ -700,6 +700,8 @@ class DownloadArchive():
|
|||||||
|
|
||||||
self.close = con.close
|
self.close = con.close
|
||||||
self.cursor = con.cursor()
|
self.cursor = con.cursor()
|
||||||
|
|
||||||
|
from . import formatter
|
||||||
self.keygen = formatter.parse(format_string).format_map
|
self.keygen = formatter.parse(format_string).format_map
|
||||||
self._cache_key = cache_key
|
self._cache_key = cache_key
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user