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

Unified Diff: pylib/gyp/xcodeproj_file.py

Issue 12094059: xcode_settings entries with list values override entries with the same key Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/xcodeproj_file.py
===================================================================
--- pylib/gyp/xcodeproj_file.py (revision 1556)
+++ pylib/gyp/xcodeproj_file.py (working copy)
@@ -1556,13 +1556,13 @@
return self._properties['buildSettings'][key]
def SetBuildSetting(self, key, value):
- # TODO(mark): If a list, copy?
- self._properties['buildSettings'][key] = value
+ if hasattr(value, '__iter__'):
+ self._properties['buildSettings'].setdefault(key, []).extend(value)
+ else:
+ self._properties['buildSettings'][key] = value
def AppendBuildSetting(self, key, value):
- if not key in self._properties['buildSettings']:
- self._properties['buildSettings'][key] = []
- self._properties['buildSettings'][key].append(value)
+ self._properties['buildSettings'].setdefault(key, []).append(value)
def DelBuildSetting(self, key):
if key in self._properties['buildSettings']:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698