Control the order of gclient spec keys in fetch
Follow the explicit iteration order of the spec keys array instead of relying
on the arbitrary iteration order of the hashtable.
BUG=
Review URL: https://chromiumcodereview.appspot.com/13878009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194973 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/fetch.py b/fetch.py
index aca0f88..c78dfe7 100755
--- a/fetch.py
+++ b/fetch.py
@@ -102,7 +102,7 @@
assert 'solutions' in self.spec
keys = ['solutions', 'target_os', 'target_os_only']
gclient_spec = '\n'.join('%s = %s' % (key, self.spec[key])
- for key in self.spec if key in keys)
+ for key in keys if key in self.spec)
self.spec['gclient_spec'] = gclient_spec
def exists(self):