Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit de177e8

Browse files
authored
Merge pull request #2164 from pre-commit/py2-cleanup
minor py2 cleanup for sys.stderr.buffer
2 parents bd787a9 + 3512e44 commit de177e8

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
FROM cogniteev/echo
1+
FROM ubuntu:focal
22

33
CMD ["echo", "This is overwritten by the .pre-commit-hooks.yaml 'entry'"]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- id: echo-entrypoint
22
name: echo (via --entrypoint)
33
language: docker_image
4-
entry: --entrypoint echo cogniteev/echo
4+
entry: --entrypoint echo ubuntu:focal
55
- id: echo-cmd
66
name: echo (via cmd)
77
language: docker_image
8-
entry: cogniteev/echo echo
8+
entry: ubuntu:focal echo

tests/languages/helpers_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def test_basic_healthy():
7272
def test_failed_setup_command_does_not_unicode_error():
7373
script = (
7474
'import sys\n'
75-
"getattr(sys.stderr, 'buffer', sys.stderr).write(b'\\x81\\xfe')\n"
76-
'exit(1)\n'
75+
"sys.stderr.buffer.write(b'\\x81\\xfe')\n"
76+
'raise SystemExit(1)\n'
7777
)
7878

7979
# an assertion that this does not raise `UnicodeError`

0 commit comments

Comments
 (0)