Add max_error_len to Github module.

This commit is contained in:
facetoe 2015-03-28 19:11:13 +08:00
parent 2701a22db4
commit 3146b2a567

View File

@ -16,6 +16,7 @@ class Github(IntervalModule):
* `{unread_count}` - number of unread notifications, empty if 0
"""
max_error_len = 50
unread_marker = ""
unread = ''
color = '#78EAF2'
@ -49,8 +50,6 @@ class Github(IntervalModule):
# Bad credentials
if isinstance(data, dict):
err_msg = data['message']
if len(err_msg) > 10:
err_msg = "%s%s" % (err_msg[:10], '...')
raise ConfigError(err_msg)
unread = len(data)