Skip to content

Commit

Permalink
replace simplejson with json
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-monch committed Sep 16, 2022
1 parent 0efcbba commit 535b38d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions datalad_container/containers_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

__docformat__ = 'restructuredtext'

import re
import json
import logging
import os
import os.path as op
import re
import sys
from shutil import copyfile
from simplejson import loads

from datalad.cmd import WitlessRunner
from datalad.interface.base import Interface
Expand Down Expand Up @@ -48,7 +48,7 @@ def _resolve_img_url(url):
req = requests.get(
'https://www.singularity-hub.org/api/container/{}'.format(
url[7:]))
shub_info = loads(req.text)
shub_info = json.loads(req.text)
url = shub_info['image']
return url

Expand Down
6 changes: 3 additions & 3 deletions datalad_container/containers_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ def __call__(cmd, container_name=None, dataset=None,

# Temporary kludge to give a more helpful message
if callspec.startswith("["):
import simplejson
import json
try:
simplejson.loads(callspec)
except simplejson.errors.JSONDecodeError:
json.loads(callspec)
except json.JSONDecodeError:
pass # Never mind, false positive.
else:
raise ValueError(
Expand Down

0 comments on commit 535b38d

Please sign in to comment.