summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Wagner <rwagner@mythtv.org>2011-04-09 16:03:19 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2011-04-09 16:03:19 (GMT)
commitd81e4ef542d6d9e9bd79dc58b70f9b90d04c06b2 (patch)
tree913c99a26ceb91adcdf2036f67028816c6e45def
parentf704dbe581997c6cde50ccdef60ffee7872aeb33 (diff)
Add a more descriptive error for failed deletes in Recorded due to
unavailable recording.
-rw-r--r--mythtv/bindings/python/MythTV/dataheap.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mythtv/bindings/python/MythTV/dataheap.py b/mythtv/bindings/python/MythTV/dataheap.py
index 8fc16db..3411105 100644
--- a/mythtv/bindings/python/MythTV/dataheap.py
+++ b/mythtv/bindings/python/MythTV/dataheap.py
@@ -214,7 +214,10 @@ class Recorded( DBDataWrite, CMPRecord ):
'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"""