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

Unified Diff: dart/tools/list_pkg_directories.py

Issue 11478021: Have list_pkg_directories.py print something. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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 | « dart/pkg/pkg.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tools/list_pkg_directories.py
diff --git a/dart/tools/list_pkg_directories.py b/dart/tools/list_pkg_directories.py
index e4cf368bfa23a1f7253dcff0b3c8c7471bca2116..6d015642dbb4dd0db62b33a6f65083f8d79b9691 100644
--- a/dart/tools/list_pkg_directories.py
+++ b/dart/tools/list_pkg_directories.py
@@ -3,7 +3,6 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
-
'''Tool for listing the directories under pkg, with their lib directories.
Used in pkg.gyp. Lists all of the directories in the current directory
which have a lib subdirectory.
@@ -11,7 +10,14 @@ which have a lib subdirectory.
Usage:
python tools/list_pkg_directories.py
'''
+
import os
+import sys
+
+def main(argv):
+ paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir(argv[1])))
+ for lib in filter(lambda x: os.path.exists(x), paths):
+ print lib
-paths = map(lambda x: x + '/lib', filter(os.path.isdir, os.listdir('.')))
-filter(lambda x: os.path.exists(x), paths)
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
« no previous file with comments | « dart/pkg/pkg.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698