Chromium Code Reviews| Index: download_from_google_storage.py |
| =================================================================== |
| --- download_from_google_storage.py (revision 207434) |
| +++ download_from_google_storage.py (working copy) |
| @@ -238,6 +238,10 @@ |
| return max_ret_code |
| +def ifexists(a): |
| + return a if os.path.exists(a) else None |
| + |
| + |
| def main(args): |
| usage = ('usage: %prog [options] target\n' |
| 'Target must be:\n' |
| @@ -254,7 +258,8 @@ |
| parser.add_option('-b', '--bucket', |
| help='Google Storage bucket to fetch from.') |
| parser.add_option('-e', '--boto', |
| - help='Specify a custom boto file.') |
| + help='Specify a custom boto file.', |
| + default=ifexists(os.path.expanduser('~/.boto.depot_tools'))) |
|
Ryan Tseng
2013/06/26 17:44:57
Instead of hardcoding ~/.boto.depot_toos, i'd rath
Peter Mayo
2013/06/26 18:20:54
The .netrc and .ssh configs are in the home direct
Ryan Tseng
2013/06/26 19:24:37
We have some code in run_slave.py that checks to s
|
| parser.add_option('-c', '--no_resume', action='store_true', |
| help='Resume download if file is partially downloaded.') |
| parser.add_option('-f', '--force', action='store_true', |