From: Jukka Rissanen Date: Tue, 5 Mar 2013 14:06:15 +0000 (+0200) Subject: test: Pretty print the error when trying to set/unset VPN property X-Git-Tag: 1.13~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94fa2abad00ce77e7a07b89f074118b0a3a08733;p=platform%2Fupstream%2Fconnman.git test: Pretty print the error when trying to set/unset VPN property --- diff --git a/test/vpn-property b/test/vpn-property index 2bafa1a..d05f4c7 100755 --- a/test/vpn-property +++ b/test/vpn-property @@ -61,6 +61,12 @@ if (argc < 3): print " %s = %s" % (key, val) elif (argc < 4): - connection.ClearProperty(sys.argv[2]) + try: + connection.ClearProperty(sys.argv[2]) + except dbus.DBusException, error: + print "%s: %s" % (error._dbus_error_name, error.message) else: - connection.SetProperty(sys.argv[2], sys.argv[3]) + try: + connection.SetProperty(sys.argv[2], sys.argv[3]) + except dbus.DBusException, error: + print "%s: %s" % (error._dbus_error_name, error.message)