Skip to content

Commit 809a83e

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 repasics@inf.u-szeged.hu
1 parent 55acdf2 commit 809a83e

File tree

9 files changed

+172
-162
lines changed

9 files changed

+172
-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: 4 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
@@ -325,7 +324,7 @@ def main():
325324

326325
if res_type == result.END:
327326
break
328-
elif res_type == result.PROMPT:
327+
if res_type == result.PROMPT:
329328
prompt.cmdloop()
330329
elif res_type == result.TEXT:
331330
write(result.get_text())
@@ -339,7 +338,7 @@ def main():
339338
MSG = str(error_msg)
340339
if ERRNO == 111:
341340
sys.exit("Failed to connect to the JerryScript debugger.")
342-
elif ERRNO == 32 or ERRNO == 104:
341+
elif ERRNO in (32, 104):
343342
sys.exit("Connection closed.")
344343
else:
345344
sys.exit("Failed to connect to the JerryScript debugger.\nError: %s" % (MSG))

0 commit comments

Comments
 (0)