From: Andreas Frisch Date: Fri, 10 Oct 2008 11:25:40 +0000 (+0000) Subject: fix possible crash on mediainfo parsing X-Git-Tag: 2.6.0~778 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/58c1a7449b3a6456fdff33a1785517233718d7ca?hp=3af3eecff28675273cd7f53169c3604cccc74c01 fix possible crash on mediainfo parsing --- diff --git a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py index 30487b69..45a8edb6 100644 --- a/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py +++ b/lib/python/Plugins/Extensions/DVDBurn/DVDToolbox.py @@ -96,8 +96,10 @@ class DVDToolbox(Screen): capacity = used used = 0 elif line.find("Free Blocks:") > -1: - size = line[15:-3].split('*') - size = int(size[0])*int(size[1])*1024 + try: + size = eval(line[14:].replace("KB","*1024")) + except: + size = 0 if size > 0: capacity = size used = capacity-used