Skip to content

Commit

Permalink
Merge "Update json module to jsonutils"
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and openstack-gerrit committed Feb 27, 2019
2 parents 1afdfc2 + 7358119 commit 4db0f5b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions zun/common/utils.py
Expand Up @@ -21,13 +21,13 @@
import eventlet
import functools
import inspect
import json
import mimetypes

from oslo_concurrency import lockutils
from oslo_concurrency import processutils
from oslo_context import context as common_context
from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import excutils
from oslo_utils import strutils
import pecan
Expand Down Expand Up @@ -369,7 +369,7 @@ def check_capsule_template(tpl):
tpl_json = tpl
if isinstance(tpl, six.string_types):
try:
tpl_json = json.loads(tpl)
tpl_json = jsonutils.loads(tpl)
except Exception as e:
raise exception.FailedParseStringToJson(e)

Expand Down
Expand Up @@ -19,12 +19,13 @@
"""

import json
import shlex

from alembic import op
import sqlalchemy as sa

from oslo_serialization import jsonutils


# revision identifiers, used by Alembic.
revision = '3e80bbfd8da7'
Expand All @@ -47,7 +48,7 @@ def upgrade():
for row in session.query(TABLE_MODEL):
if row[1]:
command = shlex.split(row[1])
command = json.dumps(command)
command = jsonutils.dumps(command)
session.execute(
TABLE_MODEL.update().values(
command=command).where(
Expand Down

0 comments on commit 4db0f5b

Please sign in to comment.