diff options
author | 2015-10-19 11:48:52 +0200 | |
---|---|---|
committer | 2015-10-19 11:48:52 +0200 | |
commit | a3d498fee5ba71265589a750c56ba89bcc204035 (patch) | |
tree | 8e2875fc8a6941809f67a67bb1fdc84757fea30a /module/plugins/internal/utils.py | |
parent | Merge pull request #2059 from GammaC0de/patch-1 (diff) | |
download | pyload-a3d498fee5ba71265589a750c56ba89bcc204035.tar.xz |
Spare fixes
Diffstat (limited to 'module/plugins/internal/utils.py')
-rw-r--r-- | module/plugins/internal/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/plugins/internal/utils.py b/module/plugins/internal/utils.py index 651ccce78..723690f39 100644 --- a/module/plugins/internal/utils.py +++ b/module/plugins/internal/utils.py @@ -24,7 +24,7 @@ except ImportError: class utils(object): __name__ = "utils" __type__ = "plugin" - __version__ = "0.02" + __version__ = "0.03" __status__ = "testing" __pattern__ = r'^unmatchable$' @@ -371,9 +371,9 @@ def replace_patterns(value, rules): return value -#@TODO: Remove in 0.4.10 and fix CookieJar.setCookie -def set_cookie(cj, domain, name, value): - return cj.setCookie(domain, name, encode(value)) +#@TODO: Remove in 0.4.10 and fix exp in CookieJar.setCookie +def set_cookie(cj, domain, name, value, path='/', exp=time.time() + 180 * 24 * 3600): + return cj.setCookie(encode(domain), encode(name), encode(value), encode(path), int(exp)) def set_cookies(cj, cookies): |