Bug #1227 » 0017-Remove-deprecated-pathlib.PurePath.is_reserved-usage.patch
common/generate_packets.py | ||
---|---|---|
"""Parse the given path and check basic validity."""
|
||
path = Path(s)
|
||
if path.is_reserved() or not path.name:
|
||
if not path.name:
|
||
raise ValueError("not a valid file path: %r" % s)
|
||
if path.exists() and not path.is_file():
|
||
raise ValueError("not a file: %r" % s)
|
- « Previous
- 1
- 2
- 3
- 4
- Next »