Fix error message in do_put()

do_put() always reports "Failed to convert to type" when it gets
exception during retry.
This is not wrong because it may gets the real error from Dbus instead
of convert_type().

Fix it by using try-except for both convert_type() and self.do_put() to
correctly report the error.

Resolves: openbmc/openbmc#3301

Tested: Setting host time when time config does not allow this, and
        verify the correct error is reported.

Change-Id: Ic46cedb7ea20d91d94b45568af9acd55af9caf56
Signed-off-by: Lei YU <mine260309@gmail.com>
1 file changed
tree: 85192dc73da6382ed0dab5ba81add8bdfe5cd7e0
  1. module/
  2. servers/
  3. LICENSE
  4. MAINTAINERS