Change in vdsm[master]: remoteFileHandler: update the stale comments of import state...

danken at redhat.com danken at redhat.com
Sat Apr 27 14:14:35 UTC 2013


Dan Kenigsberg has submitted this change and it was merged.

Change subject: remoteFileHandler: update the stale comments of import statements
......................................................................


remoteFileHandler: update the stale comments of import statements

When new child process of remoteFileHandler is started in unit test,
there is no vdsm package installed, so we can not import modules under
vdsm. There is an "if __name__ != 'main'" to conditionally not import
modules from vdsm package in the child process.

After commit d8778ad, which is reviewed at http://gerrit.ovirt.org/9217 ,
'../' is added to PYTHONPATH of the child process in unit test. The
working dir of the child is ./tests, so "from vdsm import X" will get
the module at ./tests/../vdsm/X.py . It can safely import modules under
the vdsm package now. There is no need to protect the import statements.
Then old comment explaining this becomes stale.

This patch drops the old comment, while keeps the import statements in
the "if", because the imported modules are not used in child process.

Change-Id: Ia6bb8e614db7db4a9e56ac59850bef2568468cf9
Signed-off-by: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
---
M vdsm/storage/remoteFileHandler.py
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Allon Mureinik: Looks good to me, but someone else must approve
  Dan Kenigsberg: Looks good to me, approved
  Zhou Zheng Sheng: Verified


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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6bb8e614db7db4a9e56ac59850bef2568468cf9
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Zhou Zheng Sheng <zhshzhou at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list