From ce6a6ddb463e880824e74f6628725b649fef0e76 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 21 Aug 2012 13:02:59 +0200 Subject: [PATCH] info might not have path --- pandora_client/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora_client/utils.py b/pandora_client/utils.py index ee81331..addcd9e 100644 --- a/pandora_client/utils.py +++ b/pandora_client/utils.py @@ -46,7 +46,8 @@ def avinfo(filename): if not 'display_aspect_ratio' in info['video'][0]: dar = AspectRatio(info['video'][0]['width'], info['video'][0]['height']) info['video'][0]['display_aspect_ratio'] = dar.ratio - del info['path'] + if 'path' in info: + del info['path'] if os.path.splitext(filename)[-1] in ('.srt', '.sub', '.idx', '.rar') and 'error' in info: del info['error'] if 'code' in info and info['code'] == 'badfile':