Change in vdsm[master]: utils: Change cpopen import

danken at redhat.com danken at redhat.com
Mon Mar 31 10:44:13 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: utils: Change cpopen import
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/26204/1/lib/vdsm/utils.py
File lib/vdsm/utils.py:

Line 32: from SimpleXMLRPCServer import SimpleXMLRPCRequestHandler
Line 33: from StringIO import StringIO
Line 34: from weakref import proxy
Line 35: import SocketServer
Line 36: import cpopen
Since cpopen is not part of the standard python library, it should not be imported up here.

More importantly, since we start thinking about Python3, where this module does not exist and is not needed, I think that the current code is slightly better. In fact, we should probably have the following in compat

try:
  from cpopen import CPopen as Popen
except ImportError:
  from subprocess import Popen

but we need to add childUmask support upstream, first.
Line 37: import errno
Line 38: import fcntl
Line 39: import functools
Line 40: import glob


-- 
To view, visit http://gerrit.ovirt.org/26204
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I128940e76da926e10731552c764539e62a3484b5
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Dima Kuznetsov <dkuznets at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list