Nir Soffer has posted comments on this change.

Change subject: Live Merge: Remove volume run link after live merge
......................................................................


Patch Set 10: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/59725/10/vdsm/storage/blockSD.py
File vdsm/storage/blockSD.py:

Line 821:         """
Line 822:         volRunlink = os.path.join(constants.P_VDSM_STORAGE,
Line 823:                                   self.sdUUID, imgUUID, volUUID)
Line 824:         try:
Line 825:             self.log.info("Unlinking volme runtime link: %r", 
volRunLink)
./vdsm/storage/blockSD.py:825: undefined name 'volRunLink'

This is the result of using mixedCase names in Python. In Java this works since 
the compiler detect this errors, in Python using this style is a recipe for 
failure.

To avoid this, lets use only lowercase_with_underscores names for all local 
variables.

Unfortunately, for method names and arguments we should match the module style.

Also, you ignored one of my comment about the log above in previous version, 
please address it.
Line 826:             os.unlink(volRunLink)
Line 827:         except OSError as e:
Line 828:             if e.error != errno.ENOENT:
Line 829:                 raise


Line 822:         volRunlink = os.path.join(constants.P_VDSM_STORAGE,
Line 823:                                   self.sdUUID, imgUUID, volUUID)
Line 824:         try:
Line 825:             self.log.info("Unlinking volme runtime link: %r", 
volRunLink)
Line 826:             os.unlink(volRunLink)
Same error here.
Line 827:         except OSError as e:
Line 828:             if e.error != errno.ENOENT:
Line 829:                 raise
Line 830:             self.log.debug("Volume run link %r does not exist", 
volRunlink)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib88bf92e702ac6c324b87c9459b01adf165eaca4
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Ala Hino <ah...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to