]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fix wrong type passed in terminal.warning() 37196/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Fri, 18 Sep 2020 11:51:51 +0000 (13:51 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Mon, 21 Sep 2020 11:52:16 +0000 (13:52 +0200)
`terminal.warning()` excepts a `str`.
Passing `e` means we pass a type `exceptions.RuntimeError`

Changing to `terminal.warning(e.message)` fixes the issue.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1877672
Resolves: rhbz#1877672

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit a1f42c8d7b3fe08da82c528038d8db9ccdd5c98a)

src/ceph-volume/ceph_volume/devices/simple/activate.py

index 4ce69d019b8bb98ab2c0ba496eaaa5274a104adf..1dfc1e70d85bf7631a29bff112ff926b66801c36 100644 (file)
@@ -286,7 +286,7 @@ class Activate(object):
                 try:
                     self.activate(args)
                 except RuntimeError as e:
-                    terminal.warning(e)
+                    terminal.warning(e.message)
         else:
             if args.file:
                 json_config = args.file