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

Unified Diff: chrome/tools/build/win/sln_deps.py

Issue 8680018: Fix python scripts in src/chrome/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 1 month 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 | « chrome/tools/build/win/scan_server_dlls.py ('k') | chrome/tools/build/win/sort_sln.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/build/win/sln_deps.py
diff --git a/chrome/tools/build/win/sln_deps.py b/chrome/tools/build/win/sln_deps.py
index ef7803e63baddb1e07630b742cedd0ff76c9d463..ebb371af443061ca529fd2695a848f379945eb4b 100755
--- a/chrome/tools/build/win/sln_deps.py
+++ b/chrome/tools/build/win/sln_deps.py
@@ -1,5 +1,5 @@
-#!/usr/bin/python
-# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+#!/usr/bin/env python
+# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
@@ -63,7 +63,7 @@ def ScanSlnFile(filename):
return projects
-def main(filename, project_to_scan, reverse):
+def sln_deps(filename, project_to_scan, reverse):
"""Displays the project's dependencies."""
project_to_scan = project_to_scan.lower()
@@ -91,9 +91,10 @@ def main(filename, project_to_scan, reverse):
deps_name = [projects[d].name for d in project.deps]
print "\n".join(str(" " + name) for name in sorted(deps_name,
key=str.lower))
+ return 0
-if __name__ == '__main__':
+def main():
usage = "usage: %prog [options] solution [project]"
description = ("Display the dependencies of a project in human readable"
@@ -116,5 +117,8 @@ if __name__ == '__main__':
project_to_scan = ""
if len(args) == 2:
project_to_scan = args[1]
- main(args[0], project_to_scan, options.reverse)
+ return sln_deps(args[0], project_to_scan, options.reverse)
+
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « chrome/tools/build/win/scan_server_dlls.py ('k') | chrome/tools/build/win/sort_sln.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698