Skip to content

Commit

Permalink
A clearer error message for lock race (close #408)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Peng committed Feb 9, 2017
1 parent 0cf69b1 commit 7fd9632
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sos/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ class UnavailableLock(Error):
immediately, but will be collected and raised at the end """

def __init__(self, signature):
Error.__init__(self, 'Failed to obtain a lock for output %s' % short_repr(signature[0]))
Error.__init__(self, ('Failed to obtain a lock for output {}. It is likely ' +
'that these files are protected by another SoS process or concurrant task ' +
'that is generating the same set of files.').format(short_repr(signature[0])))
self.output = signature[0]
self.sig_file = signature[1]

Expand Down

0 comments on commit 7fd9632

Please sign in to comment.