1. Roland Gude
  2. mercurial-reviewboard

Commits

fre...@haard.se  committed 6059ff5

Fix for json/simplejson import

  • Participants
  • Parent commits 2721ee3
  • Branches default

Comments (0)

Files changed (1)

File mercurial_reviewboard/reviewboard.py

View file
 import mimetools
 import os
 import urllib2
-import simplejson
 import mercurial.ui
 import datetime
 from urlparse import urljoin, urlparse
 
+try:
+    import simplejson
+    simplejson.loads("{}")
+except ImportError:
+    import json as simplejson
+
 class APIError(Exception):
     pass