Remove path on fail
This commit is contained in:
1 parent
07c7171fbb
commit
5cc471cc87
1 file changed
+3
-1
@@ -103,7 +103,9 @@ class Plugin(object):
|
|||||||
f.close()
|
f.close()
|
||||||
os.chmod(path, Env.getPermission('file'))
|
os.chmod(path, Env.getPermission('file'))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
log.error('Unable writing to file "%s": %s', (path, e))
|
log.error('Unable writing to file "%s": %s', (path, traceback.format_exc()))
|
||||||
|
if os.path.isfile(path):
|
||||||
|
os.remove(path)
|
||||||
|
|
||||||
def makeDir(self, path):
|
def makeDir(self, path):
|
||||||
path = ss(path)
|
path = ss(path)
|
||||||
|
|||||||
Reference in new issue
Block a user