summaryrefslogtreecommitdiffstats
path: root/chromium/build/dir_exists.py
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/build/dir_exists.py')
-rwxr-xr-xchromium/build/dir_exists.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/chromium/build/dir_exists.py b/chromium/build/dir_exists.py
index 0a89bc87bbf..70d367ec269 100755
--- a/chromium/build/dir_exists.py
+++ b/chromium/build/dir_exists.py
@@ -8,8 +8,16 @@ import os.path
import sys
def main():
- sys.stdout.write(str(os.path.isdir(sys.argv[1])))
+ sys.stdout.write(_is_dir(sys.argv[1]))
return 0
+def _is_dir(dir_name):
+ return str(os.path.isdir(dir_name))
+
+def DoMain(args):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ return _is_dir(args[0])
+
if __name__ == '__main__':
sys.exit(main())