Commits

jason kirtland committed a7d74c4

Support Python < 2.6 via simplejson

  • Participants
  • Parent commits ac856d5

Comments (0)

Files changed (1)

File hgflowdock.py

 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 """
 from datetime import datetime
-from json import dumps
 from os.path import basename
 import sys
 from urllib import urlencode
 from mercurial.cmdutil import changeset_templater
 from mercurial.node import bin, short
 
+try:
+    from json import dumps
+except ImportError:
+    from simplejson import dumps
+
 
 API = 'https://api.flowdock.com/v1/mercurial/'
 python_26 = sys.version_info >= (2, 6)