Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add a more descriptive error for failed deletes in Recorded due to
unavailable recording.
(cherry picked from commit d81e4ef)
  • Loading branch information
wagnerrp committed Apr 9, 2011
1 parent 782b652 commit 27c3ea5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mythtv/bindings/python/MythTV/dataheap.py
Expand Up @@ -212,7 +212,10 @@ def delete(self, force=False, rerecord=False):
'force' forces a delete if the file cannot be found.
'rerecord' sets the file as recordable in oldrecorded
"""
return self.getProgram().delete(force, rerecord)
try:
return self.getProgram().delete(force, rerecord)
except NoneType:
raise MythError("Program could not be found")

def open(self, type='r'):
"""Recorded.open(type='r') -> file or FileTransfer object"""
Expand Down

0 comments on commit 27c3ea5

Please sign in to comment.