Fix deprecated exception handling

Use 'path is on' to account for instances where the message is 'path is
on mount' vs 'path is on drive', both of which will throw this error.
This commit is contained in:
twangboy 2018-05-25 12:13:53 -06:00
parent 8dd6710b93
commit 365f81651b
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

View file

@ -73,7 +73,7 @@ def _checksum_file_path(path):
)
except ValueError as exc:
# The path is on a different drive (Windows)
if 'path is on drive' in exc.message:
if str(exc).startswith('path is on'):
drive, path = os.path.splitdrive(path)
relpath = salt.utils.path_join(
'local',