Alon Bar-Lev has posted comments on this change. Change subject: core: Add executePipe ......................................................................
Patch Set 5: (1 comment) http://gerrit.ovirt.org/#/c/26213/5/src/otopi/plugin.py File src/otopi/plugin.py: Line 479: if stdin is not None: Line 480: temp_stdin, temp_name = tempfile.mkstemp() Line 481: with os.fdopen(temp_stdin, 'w') as f: Line 482: f.write('%s\n' % '\n'.join(stdin).encode('utf-8')) Line 483: temp_stdin = open(temp_name, 'r') what do you think of: import tempfile import os name = None try: fd, name = tempfile.mkstemp() with os.fdopen(fd, 'w+') as f: f.write('line1\n'); f.write('line2\n'); f.seek(0) print(f.read()) finally: os.unlink(name) Line 484: Line 485: res_dict = self.executePipeRaw( Line 486: popenKwargsList=popenKwargsList, Line 487: stdin=temp_stdin if stdin is not None else None, -- To view, visit http://gerrit.ovirt.org/26213 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4a434fbe1308ac2f603b8ae09756354c11138912 Gerrit-PatchSet: 5 Gerrit-Project: otopi Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Simone Tiraboschi <stira...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches