except on NotImplementedError in util.link

NotImplementedError is raised on python >= 3.2 and Windows versions before Vista.  This is one part of the fix for #2114
This commit is contained in:
Johnny Robeson 2016-07-16 00:22:01 -04:00
parent 22c6d85535
commit 65e38896ad

View file

@ -471,6 +471,10 @@ def link(path, dest, replace=False):
raise FilesystemError(u'file exists', 'rename', (path, dest))
try:
os.symlink(path, dest)
except NotImplementedError:
# raised on python >= 3.2 and Windows versions before Vista
raise FilesystemError(u'Windows XP does not support symbolic links.'
'link', (path, dest), traceback.format_exc())
except OSError:
raise FilesystemError(u'Operating system does not support symbolic '
u'links.', 'link', (path, dest),