This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/127/

On January 20th, 2015, 7:41 p.m. UTC, Miloslav Trmac wrote:

src/rolekit/util.py (Diff revision 1)
44
    Create a temporary in-memory file object to store input for

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


On January 20th, 2015, 5:58 p.m. UTC, Stephen Gallagher wrote:

Review request for RoleKit Mailing List, Miloslav Trmac, Stephen Gallagher, and Thomas Woerner.
By Stephen Gallagher.

Updated Jan. 20, 2015, 5:58 p.m.

Repository: rolekit

Description

Add utility routine for passing stdin into subprocesses

Diffs

  • src/rolekit/util.py (PRE-CREATION)
  • src/rolekit/async.py (0f9ddaac1beb27cebdf41ca0383a62a807c4fcb6)

View Diff