alpine 3.10

This commit is contained in:
chris 2019-06-27 15:07:51 +02:00
parent d43d0646cd
commit 2b545b8549
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
FROM reg.zknt.org/zknt/python:3.6.6-r0
FROM reg.zknt.org/zknt/python:3.7.3-r0
COPY requirements.txt /app/requirements.txt
WORKDIR /app

6
app.py
View file

@ -10,14 +10,14 @@ class Store:
def __init__(self, dbo):
self.db = dbo
def add_version(self, pkg, version, bdate, branch='v3.8', arch='x86_64'):
def add_version(self, pkg, version, bdate, branch='v3.10', arch='x86_64'):
pkg_key = json.dumps((pkg, branch, arch))
versions = json.loads(self.db.get(pkg_key, "{}"))
if bdate not in versions:
versions[bdate] = version
self.db[pkg_key] = json.dumps(versions)
def get_feed(self, pkgs=None, branch='v3.8', arch='x86_64'):
def get_feed(self, pkgs=None, branch='v3.10', arch='x86_64'):
items = []
if not pkgs:
pkgs = ['bash']
@ -32,7 +32,7 @@ db = dbm.open('/data/cache', 'c')
pkg_store = Store(db)
def get_release(pkg, branch="v3.8", arch="x86_64"):
def get_release(pkg, branch="v3.10", arch="x86_64"):
req = requests.get(
"https://pkgs.alpinelinux.org/packages?name={}&branch={}&arch={}".format(
pkg,