On Jan. 20, 2015, 7:41 p.m., Miloslav Trmac wrote:
src/rolekit/util.py, line 44 http://reviewboard-fedoraserver.rhcloud.com/r/127/diff/1/?file=521#file521line44
Per documentation, "except that data is spooled in memory until the file size exceeds max_size, _or until the file’s fileno() method is called_, at which point the contents are written to disk and operation proceeds as with TemporaryFile()". subprocess does call fileno(), so the data will end up on disk. I suppose it would be ideally clean to use a pipe instead and write data to it similarly to the way we collect output, but that’s also much more work… *shrug* This works as well.
Actually, I may just scrap this feature anyway. I was creating it for use with postgresql's 'createuser' command, but it turns out that just passing the password to the prompt via stdin doesn't work anyway. I'll probably have to just create the user without a password and then use an SQL command to set it securely.
- Stephen
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/127/#review363 -----------------------------------------------------------
On Jan. 20, 2015, 5:58 p.m., Stephen Gallagher wrote:
This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/127/
(Updated Jan. 20, 2015, 5:58 p.m.)
Review request for RoleKit Mailing List, Miloslav Trmac, Stephen Gallagher, and Thomas Woerner.
Repository: rolekit
Description
Add utility routine for passing stdin into subprocesses
Diffs
src/rolekit/util.py PRE-CREATION src/rolekit/async.py 0f9ddaac1beb27cebdf41ca0383a62a807c4fcb6
Diff: http://reviewboard-fedoraserver.rhcloud.com/r/127/diff/
Testing
Thanks,
Stephen Gallagher