Fix error ModuleNotFoundError. Thank you roughnecks for the second time this evening!
This commit is contained in:
parent
7ee4000ee0
commit
395c2373ae
2 changed files with 3 additions and 23 deletions
|
@ -44,10 +44,9 @@ import logging
|
||||||
import os
|
import os
|
||||||
import slixmpp
|
import slixmpp
|
||||||
|
|
||||||
import slixfeed.config as config
|
from slixfeed.config import initdb, get_default_dbdir, get_value_default
|
||||||
from slixfeed.fetch import download_updates
|
|
||||||
from slixfeed.datetime import current_time
|
from slixfeed.datetime import current_time
|
||||||
from slixfeed.file import initdb, get_default_dbdir
|
from slixfeed.fetch import download_updates
|
||||||
from slixfeed.sqlite import (
|
from slixfeed.sqlite import (
|
||||||
get_entry_unread,
|
get_entry_unread,
|
||||||
get_settings_value,
|
get_settings_value,
|
||||||
|
@ -403,7 +402,7 @@ async def check_updates(jid):
|
||||||
while True:
|
while True:
|
||||||
# print(await current_time(), "> CHCK UPDATE",jid)
|
# print(await current_time(), "> CHCK UPDATE",jid)
|
||||||
await initdb(jid, download_updates)
|
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))
|
await asyncio.sleep(60 * float(val))
|
||||||
# Schedule to call this function again in 90 minutes
|
# Schedule to call this function again in 90 minutes
|
||||||
# loop.call_at(
|
# loop.call_at(
|
||||||
|
|
|
@ -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
|
# NOTE hostname and protocol are listed as one in file
|
||||||
# proxies.yaml. Perhaps a better practice would be to have
|
# proxies.yaml. Perhaps a better practice would be to have
|
||||||
# them separated. File proxies.yaml will remainas is in order
|
# them separated. File proxies.yaml will remainas is in order
|
||||||
|
|
Loading…
Reference in a new issue