Input validation must not depend on the locale
storage_policy.py: replace string.letters with string.ascii_letters. This change does not change the behaviour on Python 2. It is only needed for Python 3 because string.letters was removed. On Python 2, string.letters is modified when locale.setlocale() is called. Hopefully, Swift doesn't call setlocale() and so it's safe to replace it. Change-Id: Ifbf9332ae739b1bfc9e6d2831f4e7581e69f233d
This commit is contained in:
parent
f0af259aae
commit
4feaccf014
@ -27,7 +27,7 @@ from swift.common.exceptions import RingValidationError
|
||||
from pyeclib.ec_iface import ECDriver, ECDriverError, VALID_EC_TYPES
|
||||
|
||||
LEGACY_POLICY_NAME = 'Policy-0'
|
||||
VALID_CHARS = '-' + string.letters + string.digits
|
||||
VALID_CHARS = '-' + string.ascii_letters + string.digits
|
||||
|
||||
DEFAULT_POLICY_TYPE = REPL_POLICY = 'replication'
|
||||
EC_POLICY = 'erasure_coding'
|
||||
|
Loading…
Reference in New Issue
Block a user