diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index e059f10a..3f7ed115 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -103,7 +103,9 @@ class Plugin(object): f.close() os.chmod(path, Env.getPermission('file')) 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): path = ss(path)