Eduardo has posted comments on this change.

Change subject: vdsm: Catch OSError in _translateConnectionError
......................................................................


Patch Set 3: I would prefer that you didn't submit this

(2 inline comments)

translateConnectionError() should be removed since is redundant.
In addition in each call the except Exception clause should be removed and the 
correct type catched.

....................................................
File vdsm/storage/hsm.py
Line 2346:         # so invalidate the caches
Line 2347:         sdCache.refreshStorage()
Line 2348:         return dict(statuslist=res)
Line 2349: 
Line 2350:     def _translateConnectionError(self, e):
This is function is doing nothing.
What's the difference of each case?
In any case returns (code, msg).
Please remove it.
Line 2351:         if e is None:
Line 2352:             return 0, ""
Line 2353: 
Line 2354:         if isinstance(e, mount.MountError):


Line 2352:             return 0, ""
Line 2353: 
Line 2354:         if isinstance(e, mount.MountError):
Line 2355:             return se.MountError.code, se.MountError.message
Line 2356:         if isinstance(e, OSError):
+1.OSError in the iscsi flows has a different meaning.
Line 2357:             return (se.StorageServerValidationError.code,
Line 2358:                     se.StorageServerValidationError.message)
Line 2359:         if isinstance(e, iscsi.iscsiadm.IscsiAuthenticationError):
Line 2360:             return se.iSCSILoginAuthError.code, 
se.iSCSILoginAuthError.message


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0f36b3ea18690d7cf53439e5a0342b1495f4f181
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to