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

Unified Diff: chrome/tools/build/win/dependencies.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/create_installer_archive.py ('k') | chrome/tools/build/win/make_policy_zip.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/build/win/dependencies.py
diff --git a/chrome/tools/build/win/dependencies.py b/chrome/tools/build/win/dependencies.py
index 353c89cd7121652895c63a8b99b8c609ae149f7e..01d92544c98c6d031127d6f261c5cee445748a65 100755
--- a/chrome/tools/build/win/dependencies.py
+++ b/chrome/tools/build/win/dependencies.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.
@@ -40,6 +40,7 @@ def RunSystemCommand(cmd):
except:
raise Error("Failed to execute: " + cmd)
+
def RunDumpbin(binary_file):
"""Runs dumpbin and parses its output.
@@ -196,8 +197,19 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
return max(deps_result, delayed_result)
-def main(options, args):
+def main():
# PE means portable executable. It's any .DLL, .EXE, .SYS, .AX, etc.
+ usage = "usage: %prog [options] input output"
+ option_parser = optparse.OptionParser(usage=usage)
+ option_parser.add_option("-d",
+ "--debug",
+ dest="debug",
+ action="store_true",
+ default=False,
+ help="Display debugging information")
+ options, args = option_parser.parse_args()
+ if len(args) != 2:
+ option_parser.error("Incorrect number of arguments")
pe_name = args[0]
deps_file = args[1]
dependents, delay_loaded = RunDumpbin(pe_name)
@@ -211,15 +223,4 @@ def main(options, args):
if '__main__' == __name__:
- usage = "usage: %prog [options] input output"
- option_parser = optparse.OptionParser(usage = usage)
- option_parser.add_option("-d",
- "--debug",
- dest="debug",
- action="store_true",
- default=False,
- help="Display debugging information")
- options, args = option_parser.parse_args()
- if len(args) != 2:
- option_parser.error("Incorrect number of arguments")
- sys.exit(main(options, args))
+ sys.exit(main())
« no previous file with comments | « chrome/tools/build/win/create_installer_archive.py ('k') | chrome/tools/build/win/make_policy_zip.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698