diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-07 01:23:55 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-07-07 01:23:55 +0200 |
commit | b1759bc440cd6013837697eb8de540914f693ffd (patch) | |
tree | d170caf63d7f65e44d23ea2d91a65759a1665928 /module/plugins/hooks/HotFolder.py | |
parent | [Plugin] Fix decoding in load method (diff) | |
download | pyload-b1759bc440cd6013837697eb8de540914f693ffd.tar.xz |
No camelCase style anymore
Diffstat (limited to 'module/plugins/hooks/HotFolder.py')
-rw-r--r-- | module/plugins/hooks/HotFolder.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/module/plugins/hooks/HotFolder.py b/module/plugins/hooks/HotFolder.py index 8c922f47a..8e1d1c54f 100644 --- a/module/plugins/hooks/HotFolder.py +++ b/module/plugins/hooks/HotFolder.py @@ -14,7 +14,7 @@ from module.utils import fs_encode, save_join as fs_join class HotFolder(Hook): __name__ = "HotFolder" __type__ = "hook" - __version__ = "0.15" + __version__ = "0.16" __config__ = [("folder" , "str" , "Folder to observe" , "container"), ("watch_file", "bool", "Observe link file" , False ), @@ -32,14 +32,14 @@ class HotFolder(Hook): def periodical(self): - folder = fs_encode(self.getConfig('folder')) - file = fs_encode(self.getConfig('file')) + folder = fs_encode(self.get_config('folder')) + file = fs_encode(self.get_config('file')) try: if not os.path.isdir(os.path.join(folder, "finished")): os.makedirs(os.path.join(folder, "finished")) - if self.getConfig('watch_file'): + if self.get_config('watch_file'): with open(file, "a+") as f: f.seek(0) content = f.read().strip() @@ -61,11 +61,11 @@ class HotFolder(Hook): if not os.path.isfile(path) or f.endswith("~") or f.startswith("#") or f.startswith("."): continue - newpath = os.path.join(folder, "finished", f if self.getConfig('keep') else "tmp_" + f) + newpath = os.path.join(folder, "finished", f if self.get_config('keep') else "tmp_" + f) move(path, newpath) - self.logInfo(_("Added %s from HotFolder") % f) + self.log_info(_("Added %s from HotFolder") % f) self.core.api.addPackage(f, [newpath], 1) except (IOError, OSError), e: - self.logError(e) + self.log_error(e) |