浏览代码

[jsinterp] Correct div command

Philipp Hagemeister 10 年之前
父节点
当前提交
8cfb6efe6f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      youtube_dl/jsinterp.py

+ 1 - 1
youtube_dl/jsinterp.py

@@ -17,7 +17,7 @@ _OPERATORS = [
     ('-', operator.sub),
     ('-', operator.sub),
     ('+', operator.add),
     ('+', operator.add),
     ('%', operator.mod),
     ('%', operator.mod),
-    ('/', operator.div),
+    ('/', operator.truediv),
     ('*', operator.mul),
     ('*', operator.mul),
 ]
 ]
 _ASSIGN_OPERATORS = [(op + '=', opfunc) for op, opfunc in _OPERATORS]
 _ASSIGN_OPERATORS = [(op + '=', opfunc) for op, opfunc in _OPERATORS]