diff options
| author | 2015-10-01 23:21:14 +0200 | |
|---|---|---|
| committer | 2015-10-01 23:21:14 +0200 | |
| commit | ab3c90a7b0d18f47d3efc8259906895c1f50765d (patch) | |
| tree | ec3cde40c03e1c771d026ba2d4917f4229a31dcc /module/plugins/internal/Plugin.py | |
| parent | Merge pull request #1902 from GammaC0de/patch-3 (diff) | |
| download | pyload-ab3c90a7b0d18f47d3efc8259906895c1f50765d.tar.xz | |
Fixpack (1)
Diffstat (limited to 'module/plugins/internal/Plugin.py')
| -rw-r--r-- | module/plugins/internal/Plugin.py | 19 | 
1 files changed, 13 insertions, 6 deletions
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py index dbf6775cb..5725bfa58 100644 --- a/module/plugins/internal/Plugin.py +++ b/module/plugins/internal/Plugin.py @@ -6,6 +6,7 @@ import datetime  import inspect  import os  import re +import time  import traceback  import urllib  import urlparse @@ -77,6 +78,11 @@ def parse_name(string):  #@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 @@ -145,7 +151,10 @@ def parse_html_form(attr_str, html, input_names={}):                  else:                      inputs[name] = value -        if input_names: +        if not input_names: +            #: No attribute check +            return action, inputs +        else:              #: Check input attributes              for key, val in input_names.items():                  if key in inputs: @@ -155,14 +164,12 @@ def parse_html_form(attr_str, html, input_names={}):                          continue                      elif hasattr(val, "search") and re.match(val, inputs[key]):                          continue -                    break  #: Attibute value does not match +                    else: +                        break  #: Attibute value does not match                  else:                      break  #: Attibute name does not match              else:                  return action, inputs  #: Passed attribute check -        else: -            #: No attribute check -            return action, inputs      return {}, None  #: No matching form found @@ -179,7 +186,7 @@ def chunks(iterable, size):  class Plugin(object):      __name__    = "Plugin"      __type__    = "plugin" -    __version__ = "0.40" +    __version__ = "0.41"      __status__  = "testing"      __pattern__ = r'^unmatchable$'  | 
