Slight cleanup

This commit is contained in:
Micke Nordin 2022-01-09 19:04:48 +01:00
parent 390df8abd8
commit 1e53d8ef50
Signed by: micke
GPG key ID: 014B273D614BE877
2 changed files with 3 additions and 5 deletions

View file

@ -61,10 +61,8 @@ class SVT(Channel):
description = str(entry['description'])
published_parsed = entry['published_parsed']
title = str(entry['title'])
print('pre')
if not resolved_link:
continue
print('post')
thumbnail = make_bitmap_from_url(
thumbnail_link, wx.Size(self.m_screen_width, 150))
item = Item(description, resolved_link, self.m_provider_name,

View file

@ -149,10 +149,10 @@ def get_subscriptions(basepath: str = BASEPATH,
filename: str = DB_FILE_NAME) -> list[tuple[str, str]]:
subscriptions = list()
fullpath = path.join(basepath, filename)
con = sqlite3.connect(fullpath)
cur = con.cursor()
select_query = '''SELECT * FROM {}'''.format(SUB_TABLE)
try:
con = sqlite3.connect(fullpath)
cur = con.cursor()
select_query = '''SELECT * FROM {}'''.format(SUB_TABLE)
cur.execute(select_query)
for result in cur.fetchall():
subscriptions.append(result)