Skip to content

Commit

Permalink
Exception handling for list command
Browse files Browse the repository at this point in the history
  • Loading branch information
noam09 committed Feb 15, 2018
1 parent 4578665 commit 46ed53b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
__plugin_name__ = "Telegramer"
__author__ = "Noam"
__author_email__ = "[email protected]"
__version__ = "1.1.7.3"
__version__ = "1.1.7.4"
__url__ = "https://github.com/noam09"
__license__ = "GPLv3"
__description__ = "Control Deluge using Telegram"
Expand Down
8 changes: 5 additions & 3 deletions telegramer/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@ def format_torrent_info(torrent):
status = torrent.get_status(INFOS)
log.debug(prelog())
log.debug(status)
status_string = ''
try:
status_string = u''.join([f(status[i], status) for i, f in INFO_DICT if f is not None])
except UnicodeDecodeError as e:
# status_string = ''.join([f(status[i], status) for i, f in INFO_DICT if f is not None])
log.error(str(e))
# except UnicodeDecodeError as e:
except Exception as e:
status_string = ''
log.error(prelog() + str(e) + '\n' + traceback.format_exc())
return status_string


Expand Down

0 comments on commit 46ed53b

Please sign in to comment.