projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf94a7
)
[swfinterp] Improve undefined representation
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 17 Nov 2014 07:02:48 +0000
(08:02 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 17 Nov 2014 07:02:48 +0000
(08:02 +0100)
youtube_dl/swfinterp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/swfinterp.py
b/youtube_dl/swfinterp.py
index 6f3c3bf956bf3191c5206db53af3071994b95d59..99220940f8efde29180a22f035b9ceaeee46a11a 100644
(file)
--- a/
youtube_dl/swfinterp.py
+++ b/
youtube_dl/swfinterp.py
@@
-170,6
+170,10
@@
class _Undefined(object):
def __hash__(self):
return 0
+ def __str__(self):
+ return 'undefined'
+ __repr__ = __str__
+
undefined = _Undefined()
@@
-686,6
+690,7
@@
class SWFInterpreter(object):
res = _builtin_classes[mname]
else:
# Assume unitialized
+ # TODO warn here
res = undefined
stack.append(res)
elif opcode == 97: # setproperty