raise text value instead of exception

Bug #1917351 reported by Robert Gildein
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charms.ceph
Fix Released
Medium
Robert Gildein

Bug Description

I found that there are two exceptions (on these lines [1] and [2]) that raise the text value instead of some Exception. This will raise an error (`TypeError: exceptions must derive from BaseException`), but not the one expected.

---
[1]: https://github.com/openstack/charm-ceph-osd/blob/785ee7c455a58b9ffea1c45b59750a85180ea59d/lib/charms_ceph/crush_utils.py#L84
[2]: https://github.com/openstack/charm-ceph-osd/blob/785ee7c455a58b9ffea1c45b59750a85180ea59d/lib/charms_ceph/crush_utils.py#L114

Changed in charm-ceph-osd:
status: New → Confirmed
importance: Undecided → Medium
Changed in charm-ceph-osd:
status: Confirmed → Triaged
Changed in charm-ceph-osd:
status: Triaged → In Progress
assignee: nobody → Robert Gildein (rgildein)
Revision history for this message
Robert Gildein (rgildein) wrote :
affects: charm-ceph-osd → charms.ceph
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charms.ceph (master)

Reviewed: https://review.opendev.org/c/openstack/charms.ceph/+/780226
Committed: https://opendev.org/openstack/charms.ceph/commit/1a7e8df4efc3a0c27b5a67a4af49dc107087da4e
Submitter: "Zuul (22348)"
Branch: master

commit 1a7e8df4efc3a0c27b5a67a4af49dc107087da4e
Author: Robert Gildein <email address hidden>
Date: Fri Mar 12 12:19:34 2021 +0100

    Fixed raise text value instead of Exception

    I used ValueError for both exception.
    Also removed unnecessary flake8 ignore option.

    Closes-Bug: #1917351
    Change-Id: I5ee58aa0a34d7c266b3811f9c6b9b3076bfdc048

Changed in charms.ceph:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.