Nir Soffer has posted comments on this change.

Change subject: sdm: Add create_volume job
......................................................................


Patch Set 10: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/50221/10/vdsm/storage/sdm/api/base.py
File vdsm/storage/sdm/api/base.py:

Line 50:         except Exception as e:
Line 51:             self.log.exception("Job (id=%s desc=%s) failed",
Line 52:                                self.id, self.description)
Line 53:             self._error = utils.GeneralException(str(e))
Line 54:             self._status = jobs.STATUS.FAILED
The only difference between the exception handlers is the wrapping of the 
exeption, so we can do this instead:

    except Exception as e:
        self.log.exception(...)
        if not isinstance(e, utils.GeneralException):
            e = utils.GeneralException(str(e))
        self._error = e
        ...
Line 55:         else:
Line 56:             self._status = jobs.STATUS.DONE
Line 57:         finally:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia614059f52c9625da7841ea9fbca2b2f2375cd75
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <ali...@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: Amit Aviram <aavi...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Freddy Rolland <froll...@redhat.com>
Gerrit-Reviewer: Greg Padgett <gpadg...@redhat.com>
Gerrit-Reviewer: Idan Shaby <ish...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to