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

Side by Side Diff: pylib/gyp/generator/dump_dependency_json.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 unified diff | Download patch
OLDNEW
1 # Copyright (c) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from __future__ import print_function
6
5 import collections 7 import collections
6 import os 8 import os
7 import gyp 9 import gyp
8 import gyp.common 10 import gyp.common
9 import gyp.msvs_emulation 11 import gyp.msvs_emulation
10 import json 12 import json
11 import sys 13 import sys
12 14
13 generator_supports_multiple_toolsets = True 15 generator_supports_multiple_toolsets = True
14 16
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 targets_to_visit.append(dep) 91 targets_to_visit.append(dep)
90 92
91 try: 93 try:
92 filepath = params['generator_flags']['output_dir'] 94 filepath = params['generator_flags']['output_dir']
93 except KeyError: 95 except KeyError:
94 filepath = '.' 96 filepath = '.'
95 filename = os.path.join(filepath, 'dump.json') 97 filename = os.path.join(filepath, 'dump.json')
96 f = open(filename, 'w') 98 f = open(filename, 'w')
97 json.dump(edges, f) 99 json.dump(edges, f)
98 f.close() 100 f.close()
99 print 'Wrote json to %s.' % filename 101 print('Wrote json to %s.' % filename)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698