Closed dwrobel closed 3 years ago
/cc @bmwiedemann
Why not use 1 instead?
https://docs.python.org/2/library/functions.html#open says
The optional buffering argument specifies the file’s desired buffer size:
0 means unbuffered,
1 means line buffered,
any other positive value means use a buffer of (approximately)
that size (in bytes). A negative buffering means to use the system default,
which is usually line buffered for tty devices and fully buffered for other files.
If omitted, the system default is used.
https://docs.python.org/3/library/functions.html#open is similar
Why not use 1 instead?
As per https://docs.python.org/3/library/functions.html#open 1
is the default one.
nay, it says buffering=-1
nay, it says
buffering=-1
Indeed, I didn't spot -
in front of 1
.
Can confirm that this PR resolves https://github.com/aspiers/git-deps/issues/87 for me.
Tried to resolve the travis issues in a separate PR(https://github.com/aspiers/git-deps/pull/99), but it seems it needs someone who understands both Travis and TOX.
Fixed by 1f6c7f8 instead.
Fixes: Traceback (most recent call last): File "/usr/bin/git-deps", line 10, in
sys.exit(run())
File "/usr/lib/python3.7/site-packages/git_deps/cli.py", line 146, in run
main(sys.argv[1:])
File "/usr/lib/python3.7/site-packages/git_deps/cli.py", line 138, in main
sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)
File "/usr/lib64/python3.7/os.py", line 1026, in fdopen
return io.open(fd, *args, **kwargs)
ValueError: can't have unbuffered text I/O