[gnome-builder] python: don't loop forever in indenter prototype
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] python: don't loop forever in indenter prototype
- Date: Sat, 3 Oct 2015 12:42:34 +0000 (UTC)
commit 5807e5d719ae2b27c883084212baaf145fe37ffd
Author: Christian Hergert <christian hergert me>
Date: Sat Oct 3 05:42:26 2015 -0700
python: don't loop forever in indenter prototype
plugins/python-pack/python_indenter.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/python-pack/python_indenter.py b/plugins/python-pack/python_indenter.py
index 1d1064e..b78166c 100644
--- a/plugins/python-pack/python_indenter.py
+++ b/plugins/python-pack/python_indenter.py
@@ -329,7 +329,8 @@ class Discoveries:
iter.set_line_offset(0)
while iter.compare(stop) < 0:
- iter.forward_line()
+ if not iter.forward_line():
+ break
forward_to_nonspace(iter)
if iter.get_line_offset() < column:
self._mark_ranks_with_mask(Rank.IF | Rank.ELIF | Rank.ELSE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]