Failing to link a file now throws a FilesystemError.

This commit is contained in:
Rovanion Luckey 2014-04-26 13:13:31 +02:00
parent 3b898163ee
commit b0a843cfbe

View file

@ -460,11 +460,12 @@ def link(path, dest, replace=False):
if os.path.exists(dest) and not replace:
raise FilesystemError('file exists', 'rename', (path, dest),
traceback.format_exc())
try:
os.symlink(path, dest)
except OSError:
print "WAAT!"
raise FilesystemError('Operating system does not support symbolic '
'links.', 'link', (path, dest),
traceback.format_exc())
def unique_path(path):