summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/Captcha.py2
-rw-r--r--module/plugins/internal/Plugin.py22
-rw-r--r--module/plugins/internal/SimpleCrypter.py3
3 files changed, 24 insertions, 3 deletions
diff --git a/module/plugins/internal/Captcha.py b/module/plugins/internal/Captcha.py
index c08050ee8..600fd1d34 100644
--- a/module/plugins/internal/Captcha.py
+++ b/module/plugins/internal/Captcha.py
@@ -120,7 +120,7 @@ class Captcha(Plugin):
self.log_warning(_("Error removing: %s") % tmp_img.name, e)
traceback.print_exc()
- self.log_info(_("Captcha result: ") + result) #@TODO: Remove from here?
+ #self.log_info(_("Captcha result: ") + result) #@TODO: Remove from here?
return result
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index 7b45c40a8..1e04d388e 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -54,6 +54,26 @@ def fixurl(url):
#@TODO: Move to utils in 0.4.10
def timestamp():
return int(time.time() * 1000)
+
+
+#@TODO: Move to utils in 0.4.10
+def which(program):
+ """
+ Works exactly like the unix command which
+ Courtesy of http://stackoverflow.com/a/377028/675646
+ """
+ isExe = lambda x: os.path.isfile(x) and os.access(x, os.X_OK)
+
+ fpath, fname = os.path.split(program)
+
+ if fpath:
+ if isExe(program):
+ return program
+ else:
+ for path in os.environ['PATH'].split(os.pathsep):
+ exe_file = os.path.join(path.strip('"'), program)
+ if isExe(exe_file):
+ return exe_file
def seconds_to_midnight(gmt=0):
@@ -146,7 +166,7 @@ def chunks(iterable, size):
class Plugin(object):
__name__ = "Plugin"
__type__ = "hoster"
- __version__ = "0.30"
+ __version__ = "0.31"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 6a3f91a5b..9597116cc 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -10,7 +10,7 @@ from module.utils import fixup, html_unescape
class SimpleCrypter(Crypter, SimpleHoster):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.60"
+ __version__ = "0.61"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -91,6 +91,7 @@ class SimpleCrypter(Crypter, SimpleHoster):
def decrypt(self, pyfile):
+ self.links = [] #@TODO: Recheck in 0.4.10
self.prepare()
self.check_info() #@TODO: Remove in 0.4.10