[gnome-builder/gnome-builder-3-18] python: don't loop forever in indenter prototype
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-18] python: don't loop forever in indenter prototype
- Date: Tue, 13 Oct 2015 07:33:46 +0000 (UTC)
commit 489598368cd514878d28466d480b8931e4e02f07
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]