Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,18 @@ def prepare_city_list(self):
self.city_list = []

def _close_panel(*args):
self.close()
self.close(None)

city_cfg_path = join(SYSTEM_DIR, "new_city.cfg")
if not exists(city_cfg_path):
self.session.openWithCallback(
_close_panel,
MessageBox,
_("City list file not found!"),
_("City list file not found! Use the search to find your city first."),
MessageBox.TYPE_WARNING,
timeout=5
)
return

try:
with open(city_cfg_path, "r", encoding="utf-8") as f:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ def menu_callback(self, choice):
elif key == "exit":
return

def city_selected(self, result):
def city_selected(self, result=None):
if result is None:
return

Expand Down
Loading