#97 Fix search package by their source name and support the latest werkzeug
Merged 5 years ago by pingou. Opened 5 years ago by pingou.

file modified
+3 -3
@@ -26,7 +26,7 @@ 

  import os

  

  import aiosqlite

- import werkzeug

+ import werkzeug.utils

  

  from aiohttp import web

  
@@ -46,7 +46,7 @@ 

  

  

  CONFIG = dict()

- obj = werkzeug.import_string('mdapi.default_config')

+ obj = werkzeug.utils.import_string('mdapi.default_config')

  for key in dir(obj):

      if key.isupper():

          CONFIG[key] = getattr(obj, key)
@@ -90,7 +90,7 @@ 

                      pkg = [Packages(*item) for item in pkg]

                      break

              elif srcname:

-                 async with db.execute(GET_PACKAGE_BY_SRC, (srcname+'%',)) as cursor:

+                 async with db.execute(GET_PACKAGE_BY_SRC, (srcname+'-%',)) as cursor:

                      pkg = await cursor.fetchone()

                  if pkg:

                      pkg = Packages(*pkg)

no initial comment

Note that this seems to still have some issues with for example rpkg :(

cf: http://0.0.0.0:8080/rawhide/srcpkg/rpkg

Alright, let's give this a try in staging :)

Thanks for the review!

Pull-Request has been merged by pingou

5 years ago
Metadata