aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/jsinterp.py
diff options
context:
space:
mode:
authordirkf <fieldhouse@gmx.net>2023-02-04 01:53:47 +0000
committerdirkf <fieldhouse@gmx.net>2023-02-12 22:16:00 +0000
commitcd987e6fca336cf6570b4938442c23cd0bdf7256 (patch)
treeb0fa0ad53a4ef197387f2e2e71c1f18eda872920 /youtube_dl/jsinterp.py
parentd947ffe8e385a541f44c6125b4cbc269de6055a4 (diff)
downloadyoutube-dl-cd987e6fca336cf6570b4938442c23cd0bdf7256.tar.xz
[jsinterp] Nits
Diffstat (limited to 'youtube_dl/jsinterp.py')
-rw-r--r--youtube_dl/jsinterp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/jsinterp.py b/youtube_dl/jsinterp.py
index 1e7b342ac..60fa2b1b9 100644
--- a/youtube_dl/jsinterp.py
+++ b/youtube_dl/jsinterp.py
@@ -201,7 +201,7 @@ class JSInterpreter(object):
def __init__(self, msg, *args, **kwargs):
expr = kwargs.pop('expr', 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)
class JS_RegExp(object):
@@ -699,7 +699,7 @@ class JSInterpreter(object):
""" assert, but without risk of getting optimized out """
if not cndn:
memb = member
- raise self.Exception('{member} {msg}'.format(**locals()), expr=expr)
+ raise self.Exception('{memb} {msg}'.format(**locals()), expr=expr)
def eval_method():
if (variable, member) == ('console', 'debug'):