From 0ab1ca5501108b8038090750e8455bfb5d72c443 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Mon, 17 Nov 2014 03:53:32 +0100 Subject: [PATCH] [swfinterp] Better error message --- test/swftests/DictCall.as | 2 +- youtube_dl/swfinterp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/swftests/DictCall.as b/test/swftests/DictCall.as index 236efd848..c2d174cc2 100644 --- a/test/swftests/DictCall.as +++ b/test/swftests/DictCall.as @@ -4,7 +4,7 @@ package { public class DictCall { public static function main(d:Object):int{ - return d.x + d.y; + return d.x + d.y; } } } diff --git a/youtube_dl/swfinterp.py b/youtube_dl/swfinterp.py index 7c0ee1e61..58da6c586 100644 --- a/youtube_dl/swfinterp.py +++ b/youtube_dl/swfinterp.py @@ -564,7 +564,7 @@ class SWFInterpreter(object): elif isinstance(pname, compat_str): # Member access obj = stack.pop() assert isinstance(obj, (dict, _ScopeDict)), \ - 'Accessing member on %r' % obj + 'Accessing member %r on %r' % (pname, obj) stack.append(obj[pname]) else: # Assume attribute access idx = stack.pop()