Skip to content

Commit

Permalink
Merge pull request #133 from jkramar/master
Browse files Browse the repository at this point in the history
corrected type in EnforceCleanOption
  • Loading branch information
Qwlouse committed Jan 26, 2017
2 parents 9fc3bec + eeb16a4 commit dc92b01
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sacred/commandline_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ def apply(cls, args, run):
'Make sure that your sources under VCS and the '
'corresponding python package is installed.')
else:
for repo, (commit, is_dirty) in repos.items():
if is_dirty:
for repo in repos:
if repo['dirty']:
raise RuntimeError('EnforceClean: Uncommited changes in '
'the "{}" repository.'.format(repo))

Expand Down
6 changes: 4 additions & 2 deletions sacred/observers/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,10 @@ def from_config(cls, filename):
if 'webhook_url' in d:
obs = cls(d['webhook_url'])
else:
raise ValueError("Slack configuration file must contain an entry for 'webhook_url'!")
for k in ['completed_text', 'interrupted_text', 'failed_text', 'bot_name', 'icon']:
raise ValueError("Slack configuration file must contain "
"an entry for 'webhook_url'!")
for k in ['completed_text', 'interrupted_text', 'failed_text',
'bot_name', 'icon']:
if k in d:
setattr(obs, k, d[k])
return obs
Expand Down

0 comments on commit dc92b01

Please sign in to comment.