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

Unified Diff: native_client_sdk/src/build_tools/manifest_util.py

Issue 11421138: [NaCl SDK] update_nacl_manifest: Allow manual updating of a version. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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
Index: native_client_sdk/src/build_tools/manifest_util.py
diff --git a/native_client_sdk/src/build_tools/manifest_util.py b/native_client_sdk/src/build_tools/manifest_util.py
index 1e055d71c22a244bd772a0cca2fa0fa1d497d6f9..98904aa32b7ff9a5f1c94abe701713e65192a614 100644
--- a/native_client_sdk/src/build_tools/manifest_util.py
+++ b/native_client_sdk/src/build_tools/manifest_util.py
@@ -543,6 +543,27 @@ class SDKManifest(object):
def __str__(self):
return self.GetDataAsString()
+ def __eq__(self, other):
+ # Access to protected member _manifest_data of a client class
+ # pylint: disable=W0212
+ if (self._manifest_data['manifest_version'] !=
+ other._manifest_data['manifest_version']):
+ return False
+
+ self_bundle_names = set([b.name for b in self.GetBundles()])
+ other_bundle_names = set([b.name for b in other.GetBundles()])
Sam Clegg 2012/11/29 19:39:10 You can drop the square brackets in these kind of
binji 2012/11/30 18:55:00 Done.
+ if self_bundle_names != other_bundle_names:
+ return False
+
+ for bundle_name in self_bundle_names:
+ if self.GetBundle(bundle_name) != other.GetBundle(bundle_name):
+ return False
+
+ return True
+
+ def __ne__(self, other):
+ return not (self == other)
+
def GetDataAsString(self):
"""Returns the current JSON manifest object, pretty-printed"""
return DictToJSON(self._manifest_data)

Powered by Google App Engine
This is Rietveld 408576698