summaryrefslogtreecommitdiffstats
path: root/module/plugins/hooks/HotFolder.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-29 15:56:57 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2015-01-29 15:56:57 +0100
commitcb9e67a5437ddfafd6a93f5a208b9faf3f2d5575 (patch)
tree2175310fe13226ac859dac57d5e3a1d14d9223bf /module/plugins/hooks/HotFolder.py
parent[ExtractArchive] Fix typo (thx SelmaUrban) (diff)
downloadpyload-cb9e67a5437ddfafd6a93f5a208b9faf3f2d5575.tar.xz
Some file encoding fixup + optimizations
Diffstat (limited to 'module/plugins/hooks/HotFolder.py')
-rw-r--r--module/plugins/hooks/HotFolder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py
index b0b59e2ba..1ff02c319 100644
--- a/module/plugins/hooks/HotFolder.py
+++ b/module/plugins/hooks/HotFolder.py
@@ -39,7 +39,8 @@ class HotFolder(Hook):
makedirs(join(folder, "finished"))
if self.getConfig("watch_file"):
- with open(fs_encode(self.getConfig("file")), "a+") as f:
+ file = fs_encode(self.getConfig("file"))
+ with open(file, "a+") as f:
content = f.read().strip()
if content: