mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-21 12:34:08 +00:00
[jsinterp] Nits
This commit is contained in:
parent
d947ffe8e3
commit
cd987e6fca
@ -201,7 +201,7 @@ class JSInterpreter(object):
|
|||||||
def __init__(self, msg, *args, **kwargs):
|
def __init__(self, msg, *args, **kwargs):
|
||||||
expr = kwargs.pop('expr', None)
|
expr = kwargs.pop('expr', None)
|
||||||
if expr is not None:
|
if expr is not None:
|
||||||
msg = '{0} in: {1!r}'.format(msg.rstrip(), expr[:100])
|
msg = '{0} in: {1!r:.100}'.format(msg.rstrip(), expr)
|
||||||
super(JSInterpreter.Exception, self).__init__(msg, *args, **kwargs)
|
super(JSInterpreter.Exception, self).__init__(msg, *args, **kwargs)
|
||||||
|
|
||||||
class JS_RegExp(object):
|
class JS_RegExp(object):
|
||||||
@ -699,7 +699,7 @@ class JSInterpreter(object):
|
|||||||
""" assert, but without risk of getting optimized out """
|
""" assert, but without risk of getting optimized out """
|
||||||
if not cndn:
|
if not cndn:
|
||||||
memb = member
|
memb = member
|
||||||
raise self.Exception('{member} {msg}'.format(**locals()), expr=expr)
|
raise self.Exception('{memb} {msg}'.format(**locals()), expr=expr)
|
||||||
|
|
||||||
def eval_method():
|
def eval_method():
|
||||||
if (variable, member) == ('console', 'debug'):
|
if (variable, member) == ('console', 'debug'):
|
||||||
|
Loading…
Reference in New Issue
Block a user