Author: jsuchome Date: Fri Jul 4 09:38:29 2008 New Revision: 48863 URL: http://svn.opensuse.org/viewcvs/yast?rev=48863&view=rev Log: DBus::ReadArgs Modified: branches/tmp/lslezak/workshop/scr_dbus/DBus.py branches/tmp/lslezak/workshop/scr_dbus/yast_service.py Modified: branches/tmp/lslezak/workshop/scr_dbus/DBus.py URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/scr_dbus/DBus.py?rev=48863&r1=48862&r2=48863&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/scr_dbus/DBus.py (original) +++ branches/tmp/lslezak/workshop/scr_dbus/DBus.py Fri Jul 4 09:38:29 2008 @@ -16,13 +16,23 @@ yast_SCR = bus.get_object('org.opensuse.YaST', '/') def Read(path): - return convertDbusTypeToPythonType(yast_SCR.Read(path, 'PyNone', dbus_interface='org.opensuse.YaST')) + return convertDbusTypeToPythonType(yast_SCR.Read(path, 'PyNone', 'PyNone', dbus_interface='org.opensuse.YaST')) def ReadArg(path, var): if var != None: - return convertDbusTypeToPythonType(yast_SCR.Read(path, var, dbus_interface='org.opensuse.YaST')) + return convertDbusTypeToPythonType(yast_SCR.Read(path, var, 'PyNone', dbus_interface='org.opensuse.YaST')) else: - return convertDbusTypeToPythonType(yast_SCR.Read(path, 'PyNone', dbus_interface='org.opensuse.YaST')) + return convertDbusTypeToPythonType(yast_SCR.Read(path, 'PyNone', 'PyNone', dbus_interface='org.opensuse.YaST')) + +def ReadArgs(path, var1, var2): + v1 = var1 + v2 = var2 + if var1 == None: + v1 = 'PyNone' + if var2 == None: + v2 = 'PyNone' + convertDbusTypeToPythonType(yast_SCR.Read(path, v1, v2, dbus_interface='org.opensuse.YaST')) + def Write(path, value): if value != None: Modified: branches/tmp/lslezak/workshop/scr_dbus/yast_service.py URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/scr_dbus/yast_service.py?rev=48863&r1=48862&r2=48863&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/scr_dbus/yast_service.py (original) +++ branches/tmp/lslezak/workshop/scr_dbus/yast_service.py Fri Jul 4 09:38:29 2008 @@ -45,14 +45,17 @@ @dbus.service.method(dbus_interface='org.opensuse.YaST', - in_signature='sv', out_signature='v', sender_keyword='caller') - def Read(self, path, var, caller=None): + in_signature='svv', out_signature='v', sender_keyword='caller') + def Read(self, path, var1, var2, caller=None): my_path = convertDbusTypeToPythonType(path) ycp.SCR.DBusCaller(caller) - value = convertDbusTypeToPythonType(var) - if value != None: - ret = ycp.SCR.Read(ycp.Path(my_path), value) - else: + value1 = convertDbusTypeToPythonType(var1) + value2 = convertDbusTypeToPythonType(var2) + if value2 != None and value1 != None: + ret = ycp.SCR.Read(ycp.Path(my_path), value1, value2) + elif value1 != None: + ret = ycp.SCR.Read(ycp.Path(my_path), value1) + else: ret = ycp.SCR.Read(ycp.Path(my_path)) if ret == None: ret = 'PyNone' -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org