Browse Source

[swfinterp] Better error message

totalwebcasting
Philipp Hagemeister 10 years ago
parent
commit
0ab1ca5501
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      test/swftests/DictCall.as
  2. +1
    -1
      youtube_dl/swfinterp.py

+ 1
- 1
test/swftests/DictCall.as View File

@ -4,7 +4,7 @@
package { package {
public class DictCall { public class DictCall {
public static function main(d:Object):int{ public static function main(d:Object):int{
return d.x + d.y;
return d.x + d.y;
} }
} }
} }

+ 1
- 1
youtube_dl/swfinterp.py View File

@ -564,7 +564,7 @@ class SWFInterpreter(object):
elif isinstance(pname, compat_str): # Member access elif isinstance(pname, compat_str): # Member access
obj = stack.pop() obj = stack.pop()
assert isinstance(obj, (dict, _ScopeDict)), \ assert isinstance(obj, (dict, _ScopeDict)), \
'Accessing member on %r' % obj
'Accessing member %r on %r' % (pname, obj)
stack.append(obj[pname]) stack.append(obj[pname])
else: # Assume attribute access else: # Assume attribute access
idx = stack.pop() idx = stack.pop()


Loading…
Cancel
Save