Skip to content

Commit 34084cf

Browse files
authored
Fix None docstring when running in -OO mode (#414)
1 parent 59d788a commit 34084cf

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515
- Include docs in source distributions as well the whole tests folder,
1616
ensuring `conftest.py` is present, fixes [#364](https://github.com/PyFilesystem/pyfilesystem2/issues/364).
1717
- Stop patching copy with Python 3.8+ because it already uses sendfile.
18+
- Fixed crash when CPython's -OO flag is used
1819

1920
## [2.4.11] - 2019-09-07
2021

CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Many thanks to the following developers for contributing to this project:
66
- [Diego Argueta](https://github.com/dargueta)
77
- [Geoff Jukes](https://github.com/geoffjukes)
88
- [Giampaolo](https://github.com/gpcimino)
9+
- [Justin Charlong](https://github.com/jcharlong)
910
- [Louis Sautier](https://github.com/sbraz)
1011
- [Martin Larralde](https://github.com/althonos)
1112
- [Will McGugan](https://github.com/willmcgugan)

fs/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _method(*args, **kwargs):
8484
""".format(
8585
method.__name__
8686
)
87-
if hasattr(_method, "__doc__"):
87+
if getattr(_method, "__doc__", None) is not None:
8888
_method.__doc__ += deprecated_msg
8989

9090
return _method

0 commit comments

Comments
 (0)