Skip to content

Commit ad99e49

Browse files
committed
Upgrade jerry-debugger client to use python3
Also upgrade pylint to use python3. JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi [email protected]
1 parent 4592143 commit ad99e49

File tree

9 files changed

+173
-162
lines changed

9 files changed

+173
-162
lines changed

.github/workflows/gh-actions.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
with:
1717
python-version: '3.8'
1818
- run: sudo apt update
19-
- run: sudo apt install doxygen clang-format-10 cppcheck pylint python-serial
19+
- run: sudo apt install doxygen clang-format-10 cppcheck pylint3 python3-serial
2020
- run: $RUNNER --check-signed-off=gh-actions
2121
if: ${{ always() }}
2222
- run: $RUNNER --check-doxygen
@@ -36,9 +36,6 @@ jobs:
3636
runs-on: ubuntu-latest
3737
steps:
3838
- uses: actions/checkout@v2
39-
- uses: actions/setup-python@v2
40-
with:
41-
python-version: '2.7' # needed by jerry-debugger
4239
- run: $RUNNER -q --jerry-tests
4340
- run: $RUNNER -q --jerry-tests --build-debug
4441
- run: $RUNNER -q --jerry-debugger

jerry-debugger/jerry_client.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
# Copyright JS Foundation and other contributors, http://js.foundation
44
#
@@ -14,7 +14,6 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
from __future__ import print_function
1817
from cmd import Cmd
1918
from pprint import pprint
2019
import math
@@ -104,7 +103,7 @@ def do_next(self, args):
104103
if res_type == result.END:
105104
self.quit = True
106105
return
107-
elif res_type == result.TEXT:
106+
if res_type == result.TEXT:
108107
write(result.get_text())
109108
elif res_type == result.PROMPT:
110109
break
@@ -279,6 +278,7 @@ def main():
279278

280279
protocol = Socket(address)
281280
elif args.protocol == "serial":
281+
# pylint: disable=import-outside-toplevel
282282
from jerry_client_serial import Serial
283283
protocol = Serial(args.serial_config)
284284
else:
@@ -325,7 +325,7 @@ def main():
325325

326326
if res_type == result.END:
327327
break
328-
elif res_type == result.PROMPT:
328+
if res_type == result.PROMPT:
329329
prompt.cmdloop()
330330
elif res_type == result.TEXT:
331331
write(result.get_text())
@@ -339,7 +339,7 @@ def main():
339339
MSG = str(error_msg)
340340
if ERRNO == 111:
341341
sys.exit("Failed to connect to the JerryScript debugger.")
342-
elif ERRNO == 32 or ERRNO == 104:
342+
elif ERRNO in (32, 104):
343343
sys.exit("Connection closed.")
344344
else:
345345
sys.exit("Failed to connect to the JerryScript debugger.\nError: %s" % (MSG))

0 commit comments

Comments
 (0)