Bug 1506380 - Rename opcode.py to avoid conflict with builtin Python module. r=arai

Differential Revision: https://phabricator.services.mozilla.com/D11568

--HG--
rename : js/src/vm/opcode.py => js/src/vm/jsopcode.py
extra : moz-landing-system : lando
This commit is contained in:
Philip Chimento 2018-11-12 03:55:30 +00:00
parent 69825a35fa
commit 97ccc8c012
3 changed files with 4 additions and 4 deletions

View File

@ -26,10 +26,10 @@ def log_fail(text):
def check_opcode():
sys.path.insert(0, os.path.join(topsrcdir, 'js', 'src', 'vm'))
import opcode
import jsopcode
try:
opcode.get_opcodes(topsrcdir)
jsopcode.get_opcodes(topsrcdir)
except Exception as e:
log_fail(e.args[0])
return False

View File

@ -15,7 +15,7 @@ import sys
import os
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)))
import opcode
import jsopcode
from xml.sax.saxutils import escape
@ -139,7 +139,7 @@ if __name__ == '__main__':
dir = sys.argv[1]
try:
index, _ = opcode.get_opcodes(dir)
index, _ = jsopcode.get_opcodes(dir)
except Exception as e:
print("Error: {}".format(e.args[0]), file=sys.stderr)
sys.exit(1)