forked from sch/Slixfeed
Fix handling of document error
This commit is contained in:
parent
4c64870d8f
commit
0d7f67d721
3 changed files with 3 additions and 4 deletions
|
@ -200,7 +200,7 @@ def get_default_config_directory():
|
||||||
Returns
|
Returns
|
||||||
-------
|
-------
|
||||||
str
|
str
|
||||||
Path to configueation directory.
|
Path to configuration directory.
|
||||||
"""
|
"""
|
||||||
# config_home = xdg.BaseDirectory.xdg_config_home
|
# config_home = xdg.BaseDirectory.xdg_config_home
|
||||||
config_home = os.environ.get('XDG_CONFIG_HOME')
|
config_home = os.environ.get('XDG_CONFIG_HOME')
|
||||||
|
|
|
@ -340,7 +340,6 @@ async def send_status(self, jid):
|
||||||
db_file, "feeds")
|
db_file, "feeds")
|
||||||
# print(await current_time(), jid, "has", feeds, "feeds")
|
# print(await current_time(), jid, "has", feeds, "feeds")
|
||||||
if not feeds:
|
if not feeds:
|
||||||
print(">>> not feeds:", feeds, "jid:", jid)
|
|
||||||
status_mode = "available"
|
status_mode = "available"
|
||||||
status_text = (
|
status_text = (
|
||||||
"📪️ Send a URL from a blog or a news website"
|
"📪️ Send a URL from a blog or a news website"
|
||||||
|
|
|
@ -510,11 +510,11 @@ async def message(self, message):
|
||||||
title + "_" + timestamp() + "." + ext)
|
title + "_" + timestamp() + "." + ext)
|
||||||
error = action.generate_document(
|
error = action.generate_document(
|
||||||
data, url, ext, filename)
|
data, url, ext, filename)
|
||||||
if status:
|
if error or status:
|
||||||
response = (
|
response = (
|
||||||
"Failed to export {}. Reason: {}"
|
"Failed to export {}. Reason: {}"
|
||||||
).format(ext.upper(), error)
|
).format(ext.upper(), error)
|
||||||
elif not error:
|
else:
|
||||||
url = await upload.start(self, jid, filename)
|
url = await upload.start(self, jid, filename)
|
||||||
await send_oob_message(self, jid, url)
|
await send_oob_message(self, jid, url)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue