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

Side by Side Diff: native_client_sdk/src/project_templates/init_project.py

Issue 10910101: fix pylint warnings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """A simple project generator for Native Client projects written in C or C++. 6 """A simple project generator for Native Client projects written in C or C++.
7 7
8 This script accepts a few argument which it uses as a description of a new NaCl 8 This script accepts a few argument which it uses as a description of a new NaCl
9 project. It sets up a project with a given name and a given primary language 9 project. It sets up a project with a given name and a given primary language
10 (default: C++, optionally, C) using the appropriate files from this area. 10 (default: C++, optionally, C) using the appropriate files from this area.
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 is_vs_project: A boolean indicating whether this project has Visual 272 is_vs_project: A boolean indicating whether this project has Visual
273 Studio support. 273 Studio support.
274 project_name: A string containing the name of the project to be created. 274 project_name: A string containing the name of the project to be created.
275 project_location: A path indicating where the new project is to be placed. 275 project_location: A path indicating where the new project is to be placed.
276 project_templates_dir: The path to the project_templates directory. 276 project_templates_dir: The path to the project_templates directory.
277 os_resource: A resource to be used as os. Provided for unit testing. 277 os_resource: A resource to be used as os. Provided for unit testing.
278 """ 278 """
279 self.__is_c_project = is_c_project 279 self.__is_c_project = is_c_project
280 self.__is_vs_project = is_vs_project 280 self.__is_vs_project = is_vs_project
281 self.__project_files = [] 281 self.__project_files = []
282 self.__project_dir = None
282 self.__project_name = project_name 283 self.__project_name = project_name
283 self.__project_location = project_location 284 self.__project_location = project_location
284 self.__nacl_platform = nacl_platform 285 self.__nacl_platform = nacl_platform
285 self.__project_templates_dir = project_templates_dir 286 self.__project_templates_dir = project_templates_dir
286 # System resources are properties so mocks can be inserted. 287 # System resources are properties so mocks can be inserted.
287 self.__fileinput = fileinput 288 self.__fileinput = fileinput
288 self.__nacl_sdk_root = nacl_sdk_root 289 self.__nacl_sdk_root = nacl_sdk_root
289 self.__os = os_resource 290 self.__os = os_resource
290 self.__shutil = shutil 291 self.__shutil = shutil
291 self.__sys = sys 292 self.__sys = sys
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 project_initializer.PrepareFileContent() 496 project_initializer.PrepareFileContent()
496 return 0 497 return 0
497 498
498 499
499 if __name__ == '__main__': 500 if __name__ == '__main__':
500 try: 501 try:
501 sys.exit(main(sys.argv[1:])) 502 sys.exit(main(sys.argv[1:]))
502 except Exception as error: 503 except Exception as error:
503 print error 504 print error
504 sys.exit(1) 505 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698