Exception message is incorrect in tackerclient

Bug #1881510 reported by Hiroo Kitamura on 2020-06-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-tackerclient
Undecided
Hiroo Kitamura

Bug Description

In python-tackerclient, some exception messages are incorrect.
For example, the following message:

* Exception definition
https://opendev.org/openstack/python-tackerclient/src/branch/master/tackerclient/common/exceptions.py
```
class InvalidInput(TackerClientException):
    message = _("Invalid input: %(reason)s")
```

* Calling exception
https://opendev.org/openstack/python-tackerclient/src/branch/master/tackerclient/osc/v1/vnflcm/vnflcm.py
```
    if not body:
        raise exceptions.InvalidInput(_('The parameter file is empty'))
```

It needs to specify the arguments as follows.
This is because if the argument is omitted, the first argument will be 'message '.

* Amendment
```
raise exceptions.InvalidInput (reason=_ ('The parameter file is empty'))
```

affects: tacker → python-tackerclient
Changed in python-tackerclient:
assignee: nobody → Hiroo Kitamura (h-kitamura)
status: New → In Progress

Reviewed: https://review.opendev.org/732076
Committed: https://git.openstack.org/cgit/openstack/python-tackerclient/commit/?id=1d033f9053a12ed4d5406d38a768009c9a109397
Submitter: Zuul
Branch: master

commit 1d033f9053a12ed4d5406d38a768009c9a109397
Author: Hiroo Kitamura <email address hidden>
Date: Mon Jun 1 09:57:28 2020 +0900

    Fix exception message

    Fix some exception messages because some exception messages are not
    outputed as expected.
    In addition, the codes that seems to improve readability by explicitly
    specifying the arguments are also modified.

    Change-Id: I425d15ea9f5a3d0b6132ffd03cb577e583239c3a
    Closes-Bug: #1881510

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

Other bug subscribers