Skip to content

Commit 166d1f2

Browse files
committed
Revert to previous method of assigning rstrip() results to variables
Attempting to to casefold() and compare in a single line results in AttributeError being raised during testing with test_ntpath.py
1 parent 7b7e9f6 commit 166d1f2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/ntpath.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ def ismount(path):
294294
if _getvolumepathname:
295295
try:
296296
# The path is a mount point if it's a mounted volume.
297-
return path.rstrip(seps).casefold() == _getvolumepathname(path).rstrip(seps).casefold()
297+
x = path.rstrip(seps)
298+
y = _getvolumepathname(path).rstrip(seps)
299+
return x.casefold() == y.casefold()
298300
except (OSError, FileNotFoundError):
299301
return False
300302
else:

0 commit comments

Comments
 (0)