Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: trychange.py

Issue 10165007: Remove python 2.5 compatibility code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/scm_unittest.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trychange.py
diff --git a/trychange.py b/trychange.py
index e37347c677fc8b978b0780cfc6fa529b195a2002..4a29aecd6ba1bce36171f8f46337ee277572932b 100755
--- a/trychange.py
+++ b/trychange.py
@@ -11,6 +11,7 @@ to the server by HTTP.
import datetime
import errno
import getpass
+import json
import logging
import optparse
import os
@@ -21,16 +22,6 @@ import sys
import tempfile
import urllib
-try:
- import simplejson as json # pylint: disable=F0401
-except ImportError:
- try:
- import json # pylint: disable=F0401
- except ImportError:
- # Import the one included in depot_tools.
- sys.path.append(os.path.join(os.path.dirname(__file__), 'third_party'))
- import simplejson as json # pylint: disable=F0401
-
import breakpad # pylint: disable=W0611
import gcl
@@ -744,8 +735,6 @@ def TryChange(argv,
elif options.issue and options.patchset is None:
# Retrieve the patch from rietveld when the diff is not specified.
# When patchset is specified, it's because it's done by gcl/git-try.
- if json is None:
- parser.error('json or simplejson library is missing, please install.')
api_url = '%s/api/%d' % (options.rietveld_url, options.issue)
logging.debug(api_url)
contents = json.loads(urllib.urlopen(api_url).read())
« no previous file with comments | « tests/scm_unittest.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698