From 395c2373ae9285a085ca085245d21d2f95e51513 Mon Sep 17 00:00:00 2001 From: Schimon Jehudah Date: Thu, 28 Dec 2023 18:16:33 +0000 Subject: [PATCH] Fix error ModuleNotFoundError. Thank you roughnecks for the second time this evening! --- slixfeed/task.py | 7 +++---- slixfeed/url.py | 19 ------------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/slixfeed/task.py b/slixfeed/task.py index 6f4b016..7d9aa67 100644 --- a/slixfeed/task.py +++ b/slixfeed/task.py @@ -44,10 +44,9 @@ import logging import os import slixmpp -import slixfeed.config as config -from slixfeed.fetch import download_updates +from slixfeed.config import initdb, get_default_dbdir, get_value_default from slixfeed.datetime import current_time -from slixfeed.file import initdb, get_default_dbdir +from slixfeed.fetch import download_updates from slixfeed.sqlite import ( get_entry_unread, get_settings_value, @@ -403,7 +402,7 @@ async def check_updates(jid): while True: # print(await current_time(), "> CHCK UPDATE",jid) await initdb(jid, download_updates) - val = await config.get_value_default("check", "Settings") + val = await get_value_default("check", "Settings") await asyncio.sleep(60 * float(val)) # Schedule to call this function again in 90 minutes # loop.call_at( diff --git a/slixfeed/url.py b/slixfeed/url.py index 8497a20..edd22ac 100644 --- a/slixfeed/url.py +++ b/slixfeed/url.py @@ -27,25 +27,6 @@ from urllib.parse import ( ) -def get_hostname(url): - """ - Get hostname. - - Parameters - ---------- - url : str - URL. - - Returns - ------- - hostname : str - Hostname. - """ - parted_url = urlsplit(url) - hostname = parted_url.netloc - return hostname - - # NOTE hostname and protocol are listed as one in file # proxies.yaml. Perhaps a better practice would be to have # them separated. File proxies.yaml will remainas is in order