From 8fabdbdb280ed3f587ee0316b2fe5c584fa98fb8 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Thu, 12 Oct 2017 13:48:56 +0200 Subject: python2 compatibility --- linkermapviz/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/linkermapviz/__init__.py b/linkermapviz/__init__.py index 525dfc1..bc0ca3e 100644 --- a/linkermapviz/__init__.py +++ b/linkermapviz/__init__.py @@ -1,3 +1,5 @@ +# vim: set fileencoding=utf8 : + import sys, re, os from itertools import chain import squarify @@ -31,7 +33,10 @@ def parseSections (fd): # skip until memory map is found found = False - for l in sys.stdin: + while True: + l = sys.stdin.readline () + if not l: + break if l.strip () == 'Memory Configuration': found = True break -- cgit v1.2.3