common: move memcached exceptions to the base file.

Change-Id: I022404cd90d9755a09c20619c3a72588d3367467
This commit is contained in:
Jianjian Huo 2024-07-02 08:37:12 -07:00
parent 789d0c44d9
commit 0fd36e395d
2 changed files with 14 additions and 12 deletions

View File

@ -243,6 +243,18 @@ class QuarantineRequest(SwiftException):
pass
class MemcacheConnectionError(Exception):
pass
class MemcacheIncrNotFoundError(MemcacheConnectionError):
pass
class MemcachePoolTimeout(Timeout):
pass
class ClientException(Exception):
def __init__(self, msg, http_scheme='', http_host='', http_port='',

View File

@ -59,6 +59,8 @@ from eventlet import Timeout
from six.moves import range
from six.moves.configparser import ConfigParser, NoSectionError, NoOptionError
from swift.common import utils
from swift.common.exceptions import MemcacheConnectionError, \
MemcacheIncrNotFoundError, MemcachePoolTimeout
from swift.common.utils import md5, human_readable, config_true_value, \
memcached_timing_stats
@ -122,18 +124,6 @@ def set_msg(key, flags, timeout, value):
]) + (b'\r\n' + value + b'\r\n')
class MemcacheConnectionError(Exception):
pass
class MemcacheIncrNotFoundError(MemcacheConnectionError):
pass
class MemcachePoolTimeout(Timeout):
pass
class MemcacheConnPool(Pool):
"""
Connection pool for Memcache Connections