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

Unified Diff: pylib/gyp/MSVSNew.py

Issue 1454433002: Python 3 compatibility Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Rebase with master (4ec6c4e3a94bd04a6da2858163d40b2429b8aad1) Created 4 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
Index: pylib/gyp/MSVSNew.py
diff --git a/pylib/gyp/MSVSNew.py b/pylib/gyp/MSVSNew.py
index 593f0e5b0b2e88361f8794cc4beae22460b9683d..d0c27d2367dcbb88ff56917b07e355ae246fb2fb 100644
--- a/pylib/gyp/MSVSNew.py
+++ b/pylib/gyp/MSVSNew.py
@@ -60,9 +60,24 @@ def MakeGuid(name, seed='msvs_new'):
class MSVSSolutionEntry(object):
- def __cmp__(self, other):
- # Sort by name then guid (so things are in order on vs2008).
- return cmp((self.name, self.get_guid()), (other.name, other.get_guid()))
+ # Sort by name then guid (so things are in order on vs2008).
+ def __lt__(self, other):
Nico 2016/07/29 22:22:05 This looks like an unfortunate change :-/
AWhetter 2016/11/05 23:59:49 It is really. I could make it slighty easier on th
+ return (self.name, self.get_guid()) < (other.name, other.get_guid())
+
+ def __gt__(self, other):
+ return (self.name, self.get_guid()) > (other.name, other.get_guid())
+
+ def __eq__(self, other):
+ return (self.name, self.get_guid()) == (other.name, other.get_guid())
+
+ def __le__(self, other):
+ return (self.name, self.get_guid()) <= (other.name, other.get_guid())
+
+ def __ge__(self, other):
+ return (self.name, self.get_guid()) >= (other.name, other.get_guid())
+
+ def __ne__(self, other):
+ return (self.name, self.get_guid()) != (other.name, other.get_guid())
class MSVSFolder(MSVSSolutionEntry):
« no previous file with comments | « gyptest.py ('k') | pylib/gyp/MSVSSettings.py » ('j') | pylib/gyp/MSVSSettings_test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698