Fix the copy module to use the argsfile method
This commit is contained in:
parent
aae72ec617
commit
81a27b9c88
1 changed files with 8 additions and 2 deletions
10
copy
10
copy
|
@ -32,8 +32,14 @@ except ImportError:
|
||||||
# to a dictionary
|
# to a dictionary
|
||||||
# FIXME: make more idiomatic
|
# FIXME: make more idiomatic
|
||||||
|
|
||||||
args = " ".join(sys.argv[1:])
|
if len(sys.argv) == 1:
|
||||||
items = shlex.split(args)
|
sys.exit(1)
|
||||||
|
argfile = sys.argv[1]
|
||||||
|
if not os.path.exists(argfile):
|
||||||
|
sys.exit(1)
|
||||||
|
items = shlex.split(open(argfile, 'r').read())
|
||||||
|
|
||||||
|
|
||||||
params = {}
|
params = {}
|
||||||
for x in items:
|
for x in items:
|
||||||
(k, v) = x.split("=")
|
(k, v) = x.split("=")
|
||||||
|
|
Loading…
Add table
Reference in a new issue