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:04:47 (GMT)
commit27c3ea50cf926569ea9f021f5102c10f5456270f (patch)
treebe488430c92c0529c5ddf8a951ab518013453faa
parent782b652cfce939fee276bb8b23d33d9942e81c5a (diff)
Add a more descriptive error for failed deletes in Recorded due to
unavailable recording. (cherry picked from commit d81e4ef542d6d9e9bd79dc58b70f9b90d04c06b2)
-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 586fe75..db1d343 100644
--- a/mythtv/bindings/python/MythTV/dataheap.py
+++ b/mythtv/bindings/python/MythTV/dataheap.py
@@ -212,7 +212,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"""