mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
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:
parent
8dd6710b93
commit
365f81651b
1 changed files with 1 additions and 1 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Reference in a new issue