Commit 0317c53b authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[Py3] Fix flake8 warnings

- was missing an import sys
- check for long
- check for xrange

This file is now flake8 warning free, and should work on both Py2 and
Py3.

$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics

Bug: v8:8594
Change-Id: Iae857f4686bcad509fa700954b7f30f86150739f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2288177Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68809}
parent 1511d95e
......@@ -8,6 +8,20 @@ import struct
import subprocess
import time
import xml.etree.ElementTree
import sys
# Python2 has both int and long, Python3 only has int, which is the same as
# Python2 long.
try:
long
except NameError:
long = int
# Python2 has xrange and range. Python3 range is Python2 xrange.
try:
xrange
except NameError:
xrange = range
SOCKET_ADDR = ('localhost', 8765)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment