Skip to content

Commit 8e6f9ae

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Replace distutils"
2 parents 9fda792 + ca7a0b1 commit 8e6f9ae

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

cloudkittyclient/v2/scope.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# License for the specific language governing permissions and limitations
1313
# under the License.
1414
#
15+
from oslo_utils import strutils
16+
1517
from cloudkittyclient.common import base
1618
from cloudkittyclient import exc
1719

18-
from distutils.util import strtobool
19-
2020

2121
class ScopeManager(base.BaseManager):
2222
"""Class used to handle /v2/scope endpoint"""
@@ -133,7 +133,8 @@ def update_scope(self, **kwargs):
133133
)
134134

135135
if kwargs.get('active'):
136-
body['active'] = strtobool(kwargs.get('active'))
136+
body['active'] = strutils.bool_from_string(
137+
kwargs.get('active'), strict=True)
137138

138139
# Stripping None
139140
body = dict(filter(lambda elem: elem[1] is not None, body.items()))

0 commit comments

Comments
 (0)