removing bouquet file

This commit is contained in:
Dmitriy Yefremov
2017-11-13 00:21:52 +03:00
parent 18d3e2b73c
commit be05690cbd
2 changed files with 8 additions and 1 deletions

View File

@@ -97,7 +97,7 @@ def telnet(host, port=23, user="root", password="root", timeout=1):
time.sleep(timeout)
command = yield
tn.write("{}\r\n".format(command).encode("utf-8"))
time.sleep(timeout)
time.sleep(5) # need more time
command = yield
time.sleep(timeout)
tn.write("{}\r\n".format(command).encode("utf-8"))

View File

@@ -1,5 +1,7 @@
from contextlib import suppress
import os
from app.commons import run_task
from app.eparser import get_channels, get_bouquets, write_bouquets, write_channels, Bouquets, Bouquet, Channel
from app.properties import get_config, write_config
@@ -206,6 +208,11 @@ class MainAppWindow:
return
else:
self.__bouquets.pop(bq_selected)
self.__fav_model.clear()
# removing bouquet file
bqf = "{}userbouquet.{}.{}".format(self.__options["data_dir_path"], *bq_selected.split(":"))
with suppress(FileNotFoundError):
os.remove(bqf)
model.remove(itr)
if model_name == self._FAV_LIST_NAME: