diff options
author | johannkoenig@chromium.org <johannkoenig@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c> | 2014-01-29 06:35:46 +0000 |
---|---|---|
committer | johannkoenig@chromium.org <johannkoenig@chromium.org@4ff67af0-8c30-449e-8e8b-ad334ec8d88c> | 2014-01-29 06:35:46 +0000 |
commit | 7d32f5a7c966952d4cac0266c2f75882ec2374f5 (patch) | |
tree | 94400fbc1fa82e1fd320505b7fa9cdf06326371e /copy_obj.py | |
parent | a87d9e644b31695e7d08a76a6a7ce592d308f552 (diff) | |
download | libvpx-7d32f5a7c966952d4cac0266c2f75882ec2374f5.tar.gz |
Fix copy_src.py
Import sys
Check options.source
Correct iterator from 'path' to 'src'
TBR=dpranke@chromium.org
Review URL: https://codereview.chromium.org/133213007
git-svn-id: http://src.chromium.org/svn/trunk/deps/third_party/libvpx@247649 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Diffstat (limited to 'copy_obj.py')
-rwxr-xr-x | copy_obj.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/copy_obj.py b/copy_obj.py index fdc52a7..5fd2173 100755 --- a/copy_obj.py +++ b/copy_obj.py @@ -11,6 +11,7 @@ be copied to the destination.""" import shutil import optparse import os +import sys parser = optparse.OptionParser() parser.description = __doc__ @@ -18,12 +19,12 @@ parser.add_option('-d', '--destination') parser.add_option('-s', '--source', default=[], action='append', help='Specify multiple times for multiple sources.') options, args = parser.parse_args() -if (not options.destination or not options.sources): +if (not options.destination or not options.source): parser.error('Must specify both a destination and one or more sources.') sys.exit(1) for src in options.source: - if os.path.exists(path): + if os.path.exists(src): shutil.copyfile(src, options.destination) sys.exit(0) |