diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2017-10-12 13:48:56 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2017-10-12 13:48:56 +0200 |
commit | 8fabdbdb280ed3f587ee0316b2fe5c584fa98fb8 (patch) | |
tree | d897046a7e306f58e27a3a2ef16d98e078b79d83 | |
parent | 183035aff22d13f21bc21dd496aa6e14a5dfa1b7 (diff) | |
download | linkermapviz-8fabdbdb280ed3f587ee0316b2fe5c584fa98fb8.tar.gz linkermapviz-8fabdbdb280ed3f587ee0316b2fe5c584fa98fb8.tar.bz2 linkermapviz-8fabdbdb280ed3f587ee0316b2fe5c584fa98fb8.zip |
python2 compatibility
-rw-r--r-- | linkermapviz/__init__.py | 7 |
1 files changed, 6 insertions, 1 deletions
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 |