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
Thanks for the library, it's great. Just a small one for windows users getting the following, this can be fixed by removing the non-block flag in the os.open call. Not sure if there is a better way but this appears to fix the problem for me, and works for tailing multiple files
Thanks for the library, it's great. Just a small one for windows users getting the following, this can be fixed by removing the non-block flag in the os.open call. Not sure if there is a better way but this appears to fix the problem for me, and works for tailing multiple files
Patch:
import sys
is_windows = sys.platform == 'win32'
fh = os.fdopen(os.open(path, os.O_RDONLY | (0 if is_windows else os.O_NONBLOCK)))
Error:
Traceback (most recent call last):
File "userfile.py", line 6, in
mt = multitail2.MultiTail(glob_str)
File "C:\Python310\lib\site-packages\multitail2.py", line 152, in init
self._rescan(skip_to_end = skip_to_end)
File "C:\Python310\lib\site-packages\multitail2.py", line 177, in _rescan
self._tailedfiles[path] = TailedFile(path, skip_to_end = skip_to_end, offset = self._offsets.get(path, None))
File "C:\Python310\lib\site-packages\multitail2.py", line 16, in init
self._open(path, skip_to_end, offset)
File "C:\Python310\lib\site-packages\multitail2.py", line 30, in _open
fh = os.fdopen(os.open(path, os.O_RDONLY | os.O_NONBLOCK))
AttributeError: module 'os' has no attribute 'O_NONBLOCK'
The text was updated successfully, but these errors were encountered: