Skip to content

lists: use explicit type when storing pkglists

Martin Matějek requested to merge fix-pkglist-storing into master

Don't rely on type autodetection and use explicit types to ensure that data will by written as intended.

For example

lists = {'3g': {}, 'dvb': {}}

will raise an Exception:

  File "/usr/lib/python3.7/site-packages/svupdater/lists.py", line 108, in update_pkglists
    uci.set('pkglists', 'pkglists', 'pkglist', lists.keys())
  File "/__init__.py", line 132, in set
TypeError: 'dict_keys' object is not subscriptable

Internal error 'dict_keys' object is not subscriptable('<class 'TypeError'>')
Edited by Martin Matějek

Merge request reports