We raise the same error when we try to copy an entry without an associated file to an external device.
Signed-off-by: Simon Schampijer <si...@laptop.org> --- src/jarabe/journal/palettes.py | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py index 0b3f7d2..032f63f 100644 --- a/src/jarabe/journal/palettes.py +++ b/src/jarabe/journal/palettes.py @@ -136,6 +136,13 @@ class ObjectPalette(Palette): logging.debug('__friend_selected_cb') file_name = model.get_file(self._metadata['uid']) + if not file_name or not os.path.exists(file_name): + logging.warn('Entries without a file cannot be sent.') + self.emit('volume-error', + _('Entries without a file cannot be sent.'), + _('Warning')) + return + title = str(self._metadata['title']) description = str(self._metadata.get('description', '')) mime_type = str(self._metadata['mime_type']) -- 1.7.4 _______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel