When importing 'fuse', we might get either the libfuse or
the fusepy module, the latter doesn't have __version__ so
we just print
error: fuse module is too old for fuse.__version__
but that's misleading. Detect if we have fuse.FUSE and in
that case instead print
error: fuse module appears to be fusepy, not python-fuse
please install https://github.com/libfuse/python-fuse
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: adjust commit message and error messages]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
file=sys.stderr)
sys.exit(2)
if not hasattr(fuse, '__version__'):
- print('error: fuse module is too old for fuse.__version__', file=sys.stderr)
+ if hasattr(fuse, 'FUSE'):
+ print('error: python fuse module appears to be fusepy, not python-fuse\n'
+ ' please install https://github.com/libfuse/python-fuse',
+ file=sys.stderr)
+ else:
+ print('error: fuse module may need to be upgraded (no fuse.__version__)',
+ file=sys.stderr)
sys.exit(2)
fuse.fuse_python_api = (0, 2)