Output message instead of status code only.
This commit is contained in:
parent
6d75d02822
commit
1b2167f207
3 changed files with 8 additions and 3 deletions
|
@ -880,6 +880,7 @@ async def add_feed(self, jid_bare, db_file, url):
|
||||||
'name' : None,
|
'name' : None,
|
||||||
'code' : status_code,
|
'code' : status_code,
|
||||||
'error' : True,
|
'error' : True,
|
||||||
|
'message': result['message'],
|
||||||
'exist' : False}
|
'exist' : False}
|
||||||
break
|
break
|
||||||
elif isinstance(result, list):
|
elif isinstance(result, list):
|
||||||
|
@ -895,6 +896,7 @@ async def add_feed(self, jid_bare, db_file, url):
|
||||||
'name' : None,
|
'name' : None,
|
||||||
'code' : status_code,
|
'code' : status_code,
|
||||||
'error' : True,
|
'error' : True,
|
||||||
|
'message': result['message'],
|
||||||
'exist' : False}
|
'exist' : False}
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
@ -905,6 +907,7 @@ async def add_feed(self, jid_bare, db_file, url):
|
||||||
'name' : name,
|
'name' : name,
|
||||||
'code' : None,
|
'code' : None,
|
||||||
'error' : False,
|
'error' : False,
|
||||||
|
'message': result['message'],
|
||||||
'exist' : True}
|
'exist' : True}
|
||||||
break
|
break
|
||||||
return result_final
|
return result_final
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
__version__ = '0.1.41'
|
__version__ = '0.1.42'
|
||||||
__version_info__ = (0, 1, 41)
|
__version_info__ = (0, 1, 42)
|
||||||
|
|
|
@ -679,7 +679,9 @@ async def message(self, message):
|
||||||
result['index']))
|
result['index']))
|
||||||
elif result['error']:
|
elif result['error']:
|
||||||
response = ('> {}\nFailed to find subscriptions. '
|
response = ('> {}\nFailed to find subscriptions. '
|
||||||
'Reason: {}'.format(url, result['code']))
|
'Reason: {} (status code: {})'
|
||||||
|
.format(url, result['message'],
|
||||||
|
result['code']))
|
||||||
else:
|
else:
|
||||||
response = ('> {}\nNews source "{}" has been '
|
response = ('> {}\nNews source "{}" has been '
|
||||||
'added to subscription list.'
|
'added to subscription list.'
|
||||||
|
|
Loading…
Reference in a new issue