From 9841d5e2fbb81b19238607d0d28f05fce8822d1a Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 4 May 2009 13:48:22 +0000 Subject: [PATCH] handle not having a toc --- examples/readtoc.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/examples/readtoc.py b/examples/readtoc.py index 087c75c..21866e7 100644 --- a/examples/readtoc.py +++ b/examples/readtoc.py @@ -11,12 +11,11 @@ def main(): runner.run(t) print 'runner done', t.toc - if not t.toc: + if not t.table: print 'Failed to read TOC' return - for track in t.toc.tracks: - print track._indexes - + for track in t.table.tracks: + print track.getIndex(1).absolute main()