feature: new logic for current binhost cache
master 3.7.2.38
root 1 year ago
parent e994d2a7cb
commit 9f1a0f8d96

@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import asyncio
import hashlib
import aiohttp
import sys
import urllib.request as urllib2
@ -167,6 +169,16 @@ class BinhostsBase(Cachable):
else:
return self.BinhostStatus.EnvNotFound
@staticmethod
def packages_check_ini(binhost):
url = f"{binhost}/grp/ini.env"
try:
with _urlopen(url, timeout=10) as f:
data = f.read()
return data
except urllib2.URLError as e:
raise BinhostError
@Cachable.methodcached()
def binhost_check_sign(self, binhost):
urlhost = "{}/grp/{}".format(binhost, self.arch)
@ -183,8 +195,6 @@ class BinhostsBase(Cachable):
re_revison = re.compile("\w+=(\w+)")
def _get_timestamp(self, timestamp_file):
"""
Получить timestamp с сервера обновлений

Loading…
Cancel
Save