Verified Commit 2ecbcb77 authored by Karel Koci's avatar Karel Koci 🤘

supervisor: fix invalid import

parent c7f0c7f3
......@@ -26,7 +26,7 @@ import os
import json
import gettext
from uci import Uci, UciExceptionNotFound
from .const import USERLISTS_FILE
from .const import PKGLISTS_FILE
from .exceptions import ExceptionUpdaterNoSuchList
......@@ -52,8 +52,8 @@ def pkglists(lang=None):
languages=[lang] if lang is not None else None,
fallback=True)
if os.path.isfile(USERLISTS_FILE): # Just to be sure
with open(USERLISTS_FILE, 'r') as file:
if os.path.isfile(PKGLISTS_FILE): # Just to be sure
with open(PKGLISTS_FILE, 'r') as file:
ldul = json.load(file)
for name, lst in ldul.items():
visible = lst['visible']
......@@ -84,8 +84,8 @@ def update_pkglists(lists):
enabled. Anything omitted will be disabled.
"""
expected = set()
if os.path.isfile(USERLISTS_FILE): # Just to be sure
with open(USERLISTS_FILE, 'r') as file:
if os.path.isfile(PKGLISTS_FILE): # Just to be sure
with open(PKGLISTS_FILE, 'r') as file:
ldul = json.load(file)
for name in ldul:
expected.add(name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment