amitt001 / delegator.py

Subprocesses for Humans 2.0.
MIT License
1.7k stars 92 forks source link

Cannot pass variables to delegator.run #65

Closed DrHashi closed 5 years ago

DrHashi commented 5 years ago

. . .

for host,db,user in it.izip(db_host,db_name,db_user): archive = db + "_pgdump" + timestamp + ".sql.gz" location = path + archive

dump = delegator.run("pg_dump", "-h", host, "-U", user, db) print dump.out ... Instead of getting the output of my dump, I get this error:

    dump = delegator.run("pg_dump", "-h", host, "-U", user, db)
  File "/Users/richard/python-play/lib/python2.7/site-packages/delegator.py", line 317, in run
    c.run(block=block, binary=binary, cwd=cwd, env=env)
  File "/Users/richard/python-play/lib/python2.7/site-packages/delegator.py", line 185, in run
    popen_kwargs["env"].update(env)
ValueError: dictionary update sequence element #0 has length 1; 2 is required
ParthS007 commented 5 years ago

Closing due to inactivity :+1: