Re: [PATCH 2/2] python: in test-ui, convert to strings when storing media info




Hi Simón,

when does "media.get(key)" not return a string?

Iago

On Mon, 20 Dec 2010 18:02:44 +0100, Simon Pena <spena igalia com> wrote:
Since the TreeModel stores strings, we need to get sure that
the data types being inserted are the right ones.
---
 tools/python/grilo-test-ui.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/python/grilo-test-ui.py b/tools/python/grilo-test-ui.py
index 933fed5..1b79a41 100644
--- a/tools/python/grilo-test-ui.py
+++ b/tools/python/grilo-test-ui.py
@@ -463,7 +463,7 @@ class MainWindow(Gtk.Window):
         if media:
             keys = media.get_keys()
             for key in keys:
-                value = media.get(key)
+                value = str(media.get(key))
                 desc = Grl.metadata_key_get_desc(key)
                 metadata_model.append((desc, value))
print ('%(keyname)s: %(keyvalue)s' % {'keyname':desc,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]