Skip to content

Commit

Permalink
Merge 5e46853 into d861ffd
Browse files Browse the repository at this point in the history
  • Loading branch information
david-lindner committed Jun 21, 2019
2 parents d861ffd + 5e46853 commit d217911
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sacred/observers/telegram_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def from_config(cls, filename):
The file can be in any format supported by Sacred
(.json, .pickle, [.yaml]).
It has to specify a ``token`` and a ``chat_id`` and can optionally set
``silent_completion``,``completed_text``, ``interrupted_text``, and
``failed_text``.
``silent_completion``, ``started_text``, ``completed_text``,
``interrupted_text``, and ``failed_text``.
"""
import telegram
d = load_config_file(filename)
Expand All @@ -89,7 +89,8 @@ def from_config(cls, filename):
else:
raise ValueError("Telegram configuration file must contain "
"entries for 'token' and 'chat_id'!")
for k in ['completed_text', 'interrupted_text', 'failed_text']:
for k in ['started_text', 'completed_text', 'interrupted_text',
'failed_text']:
if k in d:
setattr(obs, k, d[k])
return obs
Expand Down

0 comments on commit d217911

Please sign in to comment.