Author: mvidner Date: Thu Jul 9 17:50:32 2009 New Revision: 57983 URL: http://svn.opensuse.org/viewcvs/yast?rev=57983&view=rev Log: In BSV types, "" again means "string". Modified: branches/tmp/mvidner/core-dbus-values/dbus/namespace_service/testsuite/t4-bad-params.py branches/tmp/mvidner/core-dbus-values/liby2dbus/src/DBusMsg.cc Modified: branches/tmp/mvidner/core-dbus-values/dbus/namespace_service/testsuite/t4-bad-params.py URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/core-dbus-values/dbus/namespace_service/testsuite/t4-bad-params.py?rev=57983&r1=57982&r2=57983&view=diff ============================================================================== --- branches/tmp/mvidner/core-dbus-values/dbus/namespace_service/testsuite/t4-bad-params.py (original) +++ branches/tmp/mvidner/core-dbus-values/dbus/namespace_service/testsuite/t4-bad-params.py Thu Jul 9 17:50:32 2009 @@ -15,6 +15,8 @@ self.T = dbus.Interface(T_o, 'org.opensuse.YaST.Values') self.YT = dbus.Interface(T_o, 'org.opensuse.YaST.YCPValues') + # dbus-Python checks these itself because of the introspection. + # TODO work around it and do send such invalid calls def testRawMissingParam(self): self.assertRaises(Exception, self.T.ParamMap) @@ -24,12 +26,13 @@ def testRawSuperfluousParam(self): self.assertRaises(Exception, self.T.ParamMap, {"foo":"bar"}, "I am superfluous") - def testBsvNil(self): - "type is required even for nil, dubious" - self.assertRaises(Exception, self.YT.ParamMap, (True, "", 0)) +#Empty type means string +# def testBsvNil(self): +# "type is required even for nil, dubious" +# self.assertRaises(Exception, self.YT.ParamMap, (True, "", "")) - def testBsvTypeRequired(self): - self.assertRaises(Exception, self.YT.ParamMap, (False, "", 0)) +# def testBsvTypeRequired(self): +# self.assertRaises(Exception, self.YT.ParamMap, (False, "", "")) def testBsvUnknownType(self): self.assertRaises(Exception, self.YT.ParamMap, (False, "ufo", 0)) Modified: branches/tmp/mvidner/core-dbus-values/liby2dbus/src/DBusMsg.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/mvidner/core-dbus-values/liby2dbus/src/DBusMsg.cc?rev=57983&r1=57982&r2=57983&view=diff ============================================================================== --- branches/tmp/mvidner/core-dbus-values/liby2dbus/src/DBusMsg.cc (original) +++ branches/tmp/mvidner/core-dbus-values/liby2dbus/src/DBusMsg.cc Thu Jul 9 17:50:32 2009 @@ -1115,7 +1115,7 @@ y2debug("HEADER: type: %s", str); std::string ycp_type = str; - if (ycp_type == "string") + if (ycp_type == "string" || ycp_type.empty()) vycptype = Type::String; else if (ycp_type == "symbol") vycptype = Type::Symbol; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org