common: move memcached exceptions to the base file.
Change-Id: I022404cd90d9755a09c20619c3a72588d3367467
This commit is contained in:
@@ -243,6 +243,18 @@ class QuarantineRequest(SwiftException):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MemcacheConnectionError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MemcacheIncrNotFoundError(MemcacheConnectionError):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class MemcachePoolTimeout(Timeout):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class ClientException(Exception):
|
class ClientException(Exception):
|
||||||
|
|
||||||
def __init__(self, msg, http_scheme='', http_host='', http_port='',
|
def __init__(self, msg, http_scheme='', http_host='', http_port='',
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ from eventlet import Timeout
|
|||||||
from six.moves import range
|
from six.moves import range
|
||||||
from six.moves.configparser import ConfigParser, NoSectionError, NoOptionError
|
from six.moves.configparser import ConfigParser, NoSectionError, NoOptionError
|
||||||
from swift.common import utils
|
from swift.common import utils
|
||||||
|
from swift.common.exceptions import MemcacheConnectionError, \
|
||||||
|
MemcacheIncrNotFoundError, MemcachePoolTimeout
|
||||||
from swift.common.utils import md5, human_readable, config_true_value, \
|
from swift.common.utils import md5, human_readable, config_true_value, \
|
||||||
memcached_timing_stats
|
memcached_timing_stats
|
||||||
|
|
||||||
@@ -122,18 +124,6 @@ def set_msg(key, flags, timeout, value):
|
|||||||
]) + (b'\r\n' + value + b'\r\n')
|
]) + (b'\r\n' + value + b'\r\n')
|
||||||
|
|
||||||
|
|
||||||
class MemcacheConnectionError(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class MemcacheIncrNotFoundError(MemcacheConnectionError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class MemcachePoolTimeout(Timeout):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class MemcacheConnPool(Pool):
|
class MemcacheConnPool(Pool):
|
||||||
"""
|
"""
|
||||||
Connection pool for Memcache Connections
|
Connection pool for Memcache Connections
|
||||||
|
|||||||
Reference in New Issue
Block a user