Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view/clipboardicon.py
diff options
context:
space:
mode:
Diffstat (limited to 'shell/view/clipboardicon.py')
-rw-r--r--shell/view/clipboardicon.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/shell/view/clipboardicon.py b/shell/view/clipboardicon.py
index 5e941f6..0844dd2 100644
--- a/shell/view/clipboardicon.py
+++ b/shell/view/clipboardicon.py
@@ -114,7 +114,14 @@ class ClipboardIcon(CanvasIcon):
formats = obj['FORMATS']
if len(formats) > 0:
path = cb_service.get_object_data(self._object_id, formats[0])
- if os.path.exists(path):
+
+ # FIXME: would be better to check for format.onDisk
+ try:
+ path_exists = os.path.exists(path)
+ except TypeError:
+ path_exists = False
+
+ if path_exists:
activityfactory.create_with_uri(self._activity, path)
else:
logging.debug("Clipboard item file path %s didn't exist" % path)