| Index: copy_obj.py
|
| ===================================================================
|
| --- copy_obj.py (revision 247557)
|
| +++ copy_obj.py (working copy)
|
| @@ -11,6 +11,7 @@
|
| import shutil
|
| import optparse
|
| import os
|
| +import sys
|
|
|
| parser = optparse.OptionParser()
|
| parser.description = __doc__
|
| @@ -18,12 +19,12 @@
|
| 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)
|
|
|
|
|