Open jtluka opened 6 years ago
I get this on my FC31.
# lnst-slave -e
Loading config file '/etc/lnst-slave.conf'
2019-11-25 17:43:21 (localhost) - INFO: Started
2019-11-25 17:43:21 (localhost) - INFO: Using RPC port 9999.
2019-11-25 17:43:21 (localhost) - INFO: deamonized with pid 433188
Traceback (most recent call last):
File "/usr/local/bin/lnst-slave", line 4, in <module>
__import__('pkg_resources').run_script('lnst===14-8d972d0f5098b5d635677aa3af15234b9a06ea01', 'lnst-slave')
File "/root/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/root/.local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1453, in run_script
exec(code, namespace, namespace)
File "/usr/local/lib/python3.7/site-packages/lnst-14_8d972d0f5098b5d635677aa3af15234b9a06ea01-py3.7.egg/EGG-INFO/scripts/lnst-slave", line 102, in <module>
main()
File "/usr/local/lib/python3.7/site-packages/lnst-14_8d972d0f5098b5d635677aa3af15234b9a06ea01-py3.7.egg/EGG-INFO/scripts/lnst-slave", line 98, in main
daemon.daemonize()
File "/usr/local/lib/python3.7/site-packages/lnst-14_8d972d0f5098b5d635677aa3af15234b9a06ea01-py3.7.egg/lnst/Common/Daemon.py", line 91, in daemonize
se = open("/dev/null", 'a+', 0)
ValueError: can't have unbuffered text I/O
Hi Antonio. I get the same on Fedora 29.
It seems that buffering cannot be set for files opened in text mode in python3. The documentation says that it's possible to set line buffering instead (buffering=1).
Replacing 'file' with 'open' should fix the issue.