[pitivi] medialibrary: Ignore all the uris which evaluate to False
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] medialibrary: Ignore all the uris which evaluate to False
- Date: Wed, 25 Dec 2013 20:31:01 +0000 (UTC)
commit ffb60f6af88afec86c76586517126e6247670109
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Dec 12 20:57:34 2013 +0100
medialibrary: Ignore all the uris which evaluate to False
pitivi/medialibrary.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 0444828..3dd7c67 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -958,7 +958,6 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
## Drag and Drop
def _dndDataReceivedCb(self, unused_widget, unused_context, unused_x,
unused_y, selection, targettype, unused_time):
-
self.debug("targettype:%d, selection.data:%r", targettype, selection.get_data())
directories = []
@@ -966,8 +965,8 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
filenames = []
uris = selection.get_data().split("\r\n")
- uris = filter(lambda x: x != "", uris)
-
+ # Filter out the empty uris.
+ uris = filter(lambda x: x, uris)
for uri in uris:
uri = unquote(uri.strip('\x00'))
if os.path.isfile(uri[7:]):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]