Skip to content

Commit

Permalink
[jsinterp] Nits
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkf committed Feb 12, 2023
1 parent d947ffe commit cd987e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions youtube_dl/jsinterp.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class Exception(ExtractorError):
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):
Expand Down Expand Up @@ -699,7 +699,7 @@ def assertion(cndn, msg):
""" 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'):
Expand Down

0 comments on commit cd987e6

Please sign in to comment.