Commit 2650ea6b authored by Helga Velroyen's avatar Helga Velroyen

Fix deprecation warning about exception

This fixes a deprecation warning regarding the retrieval
of the error message from an exception.
Signed-off-by: default avatarHelga Velroyen <helgav@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent f3ebe73e
......@@ -207,8 +207,8 @@ def CheckFileStoragePath(
try:
CheckFileStoragePathAcceptance(path, _filename=_allowed_paths_file,
exact_match_ok=True)
except errors.FileStoragePathError, e:
return e.message
except errors.FileStoragePathError as e:
return str(e)
if not os.path.isdir(path):
return "Path '%s' is not exisiting or not a directory." % path
if not os.access(path, os.W_OK):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment