Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2007-06-17 12:24:46 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2007-06-17 12:24:46 (GMT)
commit130f59efdcb288f6d4ab86ac55f7d4aefe7feab6 (patch)
tree524e67a069a94f9c0ce4c0885fc57619ee464a34 /services
parentf0e18ba785a3d57af54bb6f6a7e9993dee6e72fe (diff)
Clipboard fixes.
Diffstat (limited to 'services')
-rw-r--r--services/clipboard/clipboardobject.py4
-rw-r--r--services/clipboard/typeregistry.py1
2 files changed, 3 insertions, 2 deletions
diff --git a/services/clipboard/clipboardobject.py b/services/clipboard/clipboardobject.py
index ab00b14..d712e09 100644
--- a/services/clipboard/clipboardobject.py
+++ b/services/clipboard/clipboardobject.py
@@ -1,5 +1,6 @@
import os
import logging
+import urlparse
import typeregistry
@@ -58,7 +59,8 @@ class Format:
def destroy(self):
if self._on_disk:
- os.remove(self._data.replace('file://', ''))
+ uri = urlparse.urlparse(self._data)
+ os.remove(uri.path)
def get_type(self):
return self._type
diff --git a/services/clipboard/typeregistry.py b/services/clipboard/typeregistry.py
index 93cc7e6..eaaf6cb 100644
--- a/services/clipboard/typeregistry.py
+++ b/services/clipboard/typeregistry.py
@@ -598,7 +598,6 @@ class UriListFileType(FileType):
if len(uris) == 1:
uri = urlparse.urlparse(uris[0])
ext = posixpath.splitext(uri[2])[1]
- logging.debug(ext)
# FIXME: Bad hack, the type registry should treat text/uri-list as a special case.
if ext in ['.jpg', '.jpeg', '.gif', '.png', '.svg']:
return True