summaryrefslogtreecommitdiff
path: root/GstDebugViewer
diff options
context:
space:
mode:
authorRené Stadler <mail@renestadler.de>2012-09-21 21:38:58 +0200
committerRené Stadler <mail@renestadler.de>2012-09-21 21:38:58 +0200
commitfcf2a36abe1ba2488e3390a3b0e821a6e4a1107b (patch)
treec198b7e3ad7e0e3732a79cddd1504b15b65be2e8 /GstDebugViewer
parentc1cc4678034bdeb76281023025a5a4734a960330 (diff)
Data: also yield while loading unparseable files
Otherwise, the UI would be blocked while loading something big that is not a log file at all.
Diffstat (limited to 'GstDebugViewer')
-rw-r--r--GstDebugViewer/Data.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/GstDebugViewer/Data.py b/GstDebugViewer/Data.py
index 041214f..b989a53 100644
--- a/GstDebugViewer/Data.py
+++ b/GstDebugViewer/Data.py
@@ -314,6 +314,11 @@ class LineCache (Producer):
sort_helper = SortHelper (self.__fileobj, offsets)
find_insert_position = sort_helper.find_insert_position
while True:
+ i += 1
+ if i >= limit:
+ i = 0
+ yield True
+
offset = tell ()
line = readline ()
if not line:
@@ -336,10 +341,6 @@ class LineCache (Producer):
pos = find_insert_position (line)
levels.insert (pos, dict_levels_get (match.group (1), debug_level_none))
offsets.insert (pos, offset)
- i += 1
- if i >= limit:
- i = 0
- yield True
self.have_load_finished ()
yield False