[Dextrose] [sugar PATCH] sl#3344: Return from "listview :: __select_set_data_cb", if an IOError occurs while "model.get(uid)".

Ajay Garg ajay at activitycentral.com
Sun Mar 4 23:46:46 EST 2012


Note that, this patch needs to be applied, after applying the patch at ::

(Commit Link)
http://git.sugarlabs.org/dextrose/mainline/commit/22ee61af567acba7ee5fee1f656804a19e561684

(Patchwork Link)
http://patchwork.sugarlabs.org/patch/1205/

==========================================================================================

This is similar to the change made in version-8 of the patch
(Changes of version-8 over version-7) of the patch at :
http://patchwork.sugarlabs.org/patch/1205/

==========================================================================================

 src/jarabe/journal/listview.py |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index 5acbae7..b8f562f 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -274,7 +274,17 @@ class BaseListView(gtk.Bin):
         # cell) is available offline as well (example during
         # batch-operations, when the processing has to be done, without
         # actually clicking any cell.
-        metadata = model.get(uid)
+        try:
+            metadata = model.get(uid)
+        except:
+            # https://dev.laptop.org.au/issues/1119
+            # http://bugs.sugarlabs.org/ticket/3344
+            # Occurs, when copying entries from journal to pen-drive.
+            # Simply swallow the exception, and return, as this too,
+            # like the above case, does not have any impact on the
+            # functionality.
+            return
+
         metadata['cell'] = cell
         tree_model.update_uid_metadata_assoc(uid, metadata)
 
-- 
1.7.4.4



More information about the Dextrose mailing list