online-desktop r7288 - in trunk: pyddm/ddm weblogindriver/weblogindriver
- From: marinaz svn gnome org
- To: svn-commits-list gnome org
- Subject: online-desktop r7288 - in trunk: pyddm/ddm weblogindriver/weblogindriver
- Date: Tue, 28 Oct 2008 20:49:26 +0000 (UTC)
Author: marinaz
Date: Tue Oct 28 20:49:26 2008
New Revision: 7288
URL: http://svn.gnome.org/viewvc/online-desktop?rev=7288&view=rev
Log:
DataModel.py: update __on_query_error to only try to get two arguments if we get a data model error. Use the error code from that error.
keyring.py: use a dafault keyring by passing in None instead of "default" because the newer systems actually don't have a keyring named "default"
accounts_dialog.py: include type_link when unpacking account types
Modified:
trunk/pyddm/ddm/DataModel.py
trunk/weblogindriver/weblogindriver/accounts_dialog.py
trunk/weblogindriver/weblogindriver/keyring.py
Modified: trunk/pyddm/ddm/DataModel.py
==============================================================================
--- trunk/pyddm/ddm/DataModel.py (original)
+++ trunk/pyddm/ddm/DataModel.py Tue Oct 28 20:49:26 2008
@@ -254,12 +254,16 @@
self._on_success(result)
def __on_query_error(self, err):
- error_message, error_code = err # this unpacks args from the Exception
- _logger.error('Caught error: %s code: %s', error_message, error_code)
- # we are using ERROR_FAILED instead of the error_code here because that seems to be
- # more predictable and allows us to distinguish query error from ERROR_NO_CONNECTION
- # below
- self._on_error(ERROR_FAILED, error_message)
+ _logger.error("Query error: %s", err)
+ error_message = "Query failed."
+ error_code = ERROR_FAILED
+ if err.get_dbus_name() == "org.freedesktop.od.Model.Error":
+ # we get a message and an error code
+ error_message = err.args[0]
+ error_code = err.args[1]
+ elif len(err.args) >= 0:
+ error_message = err.args[0]
+ self._on_error(error_code, error_message)
def __async_no_connection_error(self):
self._on_error(ERROR_NO_CONNECTION, "No connection to engine to data model engine")
Modified: trunk/weblogindriver/weblogindriver/accounts_dialog.py
==============================================================================
--- trunk/weblogindriver/weblogindriver/accounts_dialog.py (original)
+++ trunk/weblogindriver/weblogindriver/accounts_dialog.py Tue Oct 28 20:49:26 2008
@@ -502,7 +502,7 @@
return
current_iter = self.__account_types_combo.get_active_iter()
- for (account_type, (type_full_name, user_info_type)) in self.__all_account_types.items():
+ for (account_type, (type_full_name, user_info_type, type_link)) in self.__all_account_types.items():
if self.__account_types_model.get_value(current_iter, 0) == type_full_name:
self.__online_accounts_service.GetOrCreateAccount(account_type, text, self.account_add_return_cb, self.account_add_error_cb)
return
Modified: trunk/weblogindriver/weblogindriver/keyring.py
==============================================================================
--- trunk/weblogindriver/weblogindriver/keyring.py (original)
+++ trunk/weblogindriver/weblogindriver/keyring.py Tue Oct 28 20:49:26 2008
@@ -100,7 +100,7 @@
found = set()
for f in found:
- gnomekeyring.item_delete_sync('default', f.item_id)
+ gnomekeyring.item_delete_sync(None, f.item_id)
def store_login(self, account_type, username, password):
@@ -125,7 +125,7 @@
self.__fallback_items.add(ki)
else:
- keyring_item_id = gnomekeyring.item_create_sync('default',
+ keyring_item_id = gnomekeyring.item_create_sync(None,
gnomekeyring.ITEM_GENERIC_SECRET,
"WebLoginDriver",
dict(appname="WebLoginDriver",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]