Skip to content
This repository was archived by the owner on Aug 28, 2023. It is now read-only.

Commit 9869ed8

Browse files
committed
Switch to internal Sentry json
1 parent 205311e commit 9869ed8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sentry_github/plugin.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"""
88

99
from django import forms
10-
from django.utils import simplejson
1110
from django.utils.translation import ugettext_lazy as _
1211
from sentry.plugins.bases.issue import IssuePlugin
12+
from sentry.utils import json
1313

1414
import sentry_github
1515
import urllib2
@@ -55,7 +55,7 @@ def create_issue(self, request, group, form_data, **kwargs):
5555

5656
url = 'https://api.github.com/repos/%s/issues' % (repo,)
5757

58-
data = simplejson.dumps({
58+
data = json.dumps({
5959
"title": form_data['title'],
6060
"body": form_data['description'],
6161
# "assignee": form_data['asignee'],
@@ -78,7 +78,7 @@ def create_issue(self, request, group, form_data, **kwargs):
7878
msg = e.read()
7979
if 'application/json' in e.headers.get('Content-Type', ''):
8080
try:
81-
msg = simplejson.loads(msg)
81+
msg = json.loads(msg)
8282
msg = msg['message']
8383
except Exception:
8484
# We failed, but we still want to report the original error
@@ -88,7 +88,7 @@ def create_issue(self, request, group, form_data, **kwargs):
8888
raise forms.ValidationError(_('Error communicating with GitHub: %s') % (msg,))
8989

9090
try:
91-
data = simplejson.load(resp)
91+
data = json.load(resp)
9292
except Exception, e:
9393
raise forms.ValidationError(_('Error decoding response from GitHub: %s') % (e,))
9494

0 commit comments

Comments
 (0)