diff --git a/CHANGELOG.md b/CHANGELOG.md index 752ed141..d4ee5f79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [2.4.4] - 2019-02-23 + +### Fixed + +- OSFS fail in nfs mounts + ## [2.4.3] - 2019-02-23 ### Fixed diff --git a/fs/_version.py b/fs/_version.py index 96b96f17..4b898d60 100644 --- a/fs/_version.py +++ b/fs/_version.py @@ -1,3 +1,3 @@ """Version, used in module and setup.py. """ -__version__ = "2.4.3" +__version__ = "2.4.4" diff --git a/fs/base.py b/fs/base.py index 8ccfcf04..0a4183fb 100644 --- a/fs/base.py +++ b/fs/base.py @@ -1484,7 +1484,7 @@ def validatepath(self, path): pass else: if len(sys_path) > max_sys_path_length: - _msg = "path too long " "(max {max_chars} characters in sys path)" + _msg = "path too long (max {max_chars} characters in sys path)" msg = _msg.format(max_chars=max_sys_path_length) raise errors.InvalidPath(path, msg=msg) path = abspath(normpath(path)) diff --git a/fs/osfs.py b/fs/osfs.py index 20dee97c..72cab396 100644 --- a/fs/osfs.py +++ b/fs/osfs.py @@ -151,9 +151,13 @@ def __init__( _meta["invalid_path_chars"] = "\0" if "PC_PATH_MAX" in os.pathconf_names: - _meta["max_sys_path_length"] = os.pathconf( - fsencode(_root_path), os.pathconf_names["PC_PATH_MAX"] - ) + try: + _meta["max_sys_path_length"] = os.pathconf( + fsencode(_root_path), os.pathconf_names["PC_PATH_MAX"] + ) + except OSError: # pragma: no cover + # The above fails with nfs mounts on OSX. Go figure. + pass def __repr__(self): # type: () -> str