Change in vdsm[master]: commands: import StringIO only on Python 2

nsoffer at redhat.com nsoffer at redhat.com
Wed Mar 30 11:33:14 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: commands: import StringIO only on Python 2
......................................................................


Patch Set 3: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/55380/3/lib/vdsm/commands.py
File lib/vdsm/commands.py:

Line 37: 
Line 38: # this is an ugly hack to let this module load on Python 3, and fail later when
Line 39: # AsyncProc is used.
Line 40: if sys.version_info[0] == 2:
Line 41:     from StringIO import StringIO
I'm against these hacks. If you want to run this code with Python, fix the real issue - get rid of AsyncProc.
Line 42: 
Line 43: # Buffsize is 1K because I tested it on some use cases and 1K was fastest. If
Line 44: # you find this number to be a bottleneck in any way you are welcome to change
Line 45: # it


-- 
To view, visit https://gerrit.ovirt.org/55380
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3610865945aeee3b13b8e195c749023a524ebe97
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list