Closed Wyko closed 4 years ago
Discussion on this topic on Stackoverflow https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows
@harro Right, there are alternatives that can work on Windows. But until they are built into textfsm, that will need to be a manual change every time you use this module. Since fcntl
is used in only one part of this module, and not a critical one, why not do:
# In terminal.py
fcntl_imported= False
try:
import fcntl
fcntl_imported= True
except ImportError:
pass
def TerminalSize():
if not fcntl_imported:
raise ModuleNotFoundError('No module named 'fcntl')
That way, it will raise an error only when the user tries to use that specific method.
Added fix to following pull request #68
Module
clitables
can not be imported on Windows machines due tofcntl
.