#95 Handle the case where the query return more than two values
Merged 5 years ago by pingou. Opened 5 years ago by pingou.

file modified
+1 -1
@@ -229,7 +229,7 @@ 

      def build_cache(uri, cache):

          conn = sqlite3.connect(uri)

          query = queries.get(table, default_query).format(table=table)

-         for pkgId, pkgname in conn.execute(query):

+         for pkgId, pkgname, *args in conn.execute(query):

              cache[pkgId] = pkgname

          conn.close()

  

This should fix the error we're seeing in production:

  File "/code/mdapi-get_repo_md", line 232, in build_cache
    for pkgId, pkgname in conn.execute(query):
ValueError: too many values to unpack (expected 2)

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

rebased onto b2e603a

5 years ago

Thanks, let's see if that helps in staging :)

Pull-Request has been merged by pingou

5 years ago
Metadata