[FIX] migration: when the module is a symlink, just delete the symlink

bzr revid: christophe@tinyerp.com-20090109135921-gg3zas4mcijmrfc7
This commit is contained in:
Christophe Simonis
2009-01-09 14:59:21 +01:00
parent 90e04b8632
commit 35cba4cd42
+4 -1
View File
@@ -398,7 +398,10 @@ GNU Public Licence.
mp = addons.get_module_path(module)
if mp:
if os.path.isdir(mp):
rmtree(os.path.realpath(mp))
if os.path.islink(mp):
os.unlink(mp)
else:
rmtree(mp)
else:
os.unlink(mp + '.zip')