Fix mutable default argument in Quobyte jsonrpc
Change-Id: I03d86c45aed3238cfa82de3eea5bc44c285cc118
Closes-Bug: #1773929
(cherry picked from commit 5deab9b9cf
)
This commit is contained in:
parent
36068e0223
commit
d5ff8bb949
|
@ -59,7 +59,9 @@ class JsonRpc(object):
|
|||
self._cert_file = cert_file
|
||||
|
||||
@utils.synchronized('quobyte-request')
|
||||
def call(self, method_name, user_parameters, expected_errors=[]):
|
||||
def call(self, method_name, user_parameters, expected_errors=None):
|
||||
if expected_errors is None:
|
||||
expected_errors = []
|
||||
# prepare request
|
||||
self._id += 1
|
||||
parameters = {'retry': 'INFINITELY'} # Backend specific setting
|
||||
|
@ -103,7 +105,9 @@ class JsonRpc(object):
|
|||
LOG.debug("Backend request resulted in error: %s", result.text)
|
||||
result.raise_for_status()
|
||||
|
||||
def _checked_for_application_error(self, result, expected_errors=[]):
|
||||
def _checked_for_application_error(self, result, expected_errors=None):
|
||||
if expected_errors is None:
|
||||
expected_errors = []
|
||||
if 'error' in result and result['error']:
|
||||
if 'message' in result['error'] and 'code' in result['error']:
|
||||
if result["error"]["code"] in expected_errors:
|
||||
|
|
|
@ -78,9 +78,10 @@ class QuobyteShareDriver(driver.ExecuteMixin, driver.ShareDriver,):
|
|||
1.2.3 - Updated RPC layer for improved stability
|
||||
1.2.4 - Fixed handling updated QB API error codes
|
||||
1.2.5 - Fixed two quota handling bugs
|
||||
1.2.6 - Fixed volume resize and jsonrpc code style bugs
|
||||
"""
|
||||
|
||||
DRIVER_VERSION = '1.2.5'
|
||||
DRIVER_VERSION = '1.2.6'
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(QuobyteShareDriver, self).__init__(False, *args, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue