You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[root@localhost ~]# lnst-slave -e
Loading config file '/etc/lnst-slave.conf'
2018-10-11 11:22:12 (localhost) - INFO: Started
2018-10-11 11:22:12 (localhost) - INFO: Using RPC port 9999.
Traceback (most recent call last):
File "/usr/local/bin/lnst-slave", line 102, in <module>
main()
File "/usr/local/bin/lnst-slave", line 98, in main
daemon.daemonize()
File "/usr/local/lib/python3.6/site-packages/lnst/Common/Daemon.py", line 56, in daemonize
pid = self._read_pid()
File "/usr/local/lib/python3.6/site-packages/lnst/Common/Daemon.py", line 28, in _read_pid
handle = file(self._pidfile, "r")
NameError: name 'file' is not defined
Replacing 'file' with 'open' should fix the issue.
The text was updated successfully, but these errors were encountered:
# 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
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.
The text was updated successfully, but these errors were encountered: