mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
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:
parent
69825a35fa
commit
97ccc8c012
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user