Handle OSError during symlink support check

Under a windows that supports symlinks (Vista+), we still need
proper privileges. If we don't have it, OSError is raised and we
need to correctly handle this case. Ref #220.
This commit is contained in:
Virgil Dupras 2013-07-14 13:59:03 -04:00
parent 9225697053
commit db0901b1de
1 changed files with 4 additions and 0 deletions

View File

@ -31,6 +31,10 @@ class DeletionOptions(GUIObject):
try:
os.symlink()
except NotImplementedError:
# Windows XP, not supported
return False
except OSError:
# Vista+, symbolic link privilege not held
return False
except TypeError:
# wrong number of arguments