Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 366776 Details for
Bug 496642
net-mail/automx automagically uses dev-python/python-memcached at run-time
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
memcache optional patch
memcache-optional.patch (text/plain), 1.26 KB, created by
Marc Schiffbauer
on 2014-01-02 14:46:26 UTC
(
hide
)
Description:
memcache optional patch
Filename:
MIME Type:
Creator:
Marc Schiffbauer
Created:
2014-01-02 14:46:26 UTC
Size:
1.26 KB
patch
obsolete
>diff --git a/src/automx/config.py b/src/automx/config.py >index 48a8e16..a79fb34 100644 >--- a/src/automx/config.py >+++ b/src/automx/config.py >@@ -27,9 +27,14 @@ import subprocess > import shlex > import StringIO > import re >-import memcache > import logging > >+try: >+ import memcache >+ use_memcache = True >+except ImportError: >+ use_memcache = False >+ > from ConfigParser import NoOptionError, NoSectionError > from ipaddr import IPAddress, IPNetwork > from dateutil import parser >@@ -849,7 +854,7 @@ class Memcache(object): > return self.__current > > def set_client(self): >- if not self.__has_memcache: >+ if not self.__has_memcache or use_memcache is False: > return > > if self.__is_trusted_network(): >@@ -870,7 +875,7 @@ class Memcache(object): > self.__mc.set(self.__client, self.__current, time=ttl) > > def allow_client(self): >- if not self.__has_memcache: >+ if not self.__has_memcache or use_memcache is False: > return True > > self.__client = self.__environ["REMOTE_ADDR"] >@@ -914,4 +919,4 @@ class Memcache(object): > > return False > >-# vim: expandtab ts=4 sw=4 >\ No newline at end of file >+# vim: expandtab ts=4 sw=4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 496642
: 366776