Fix wiggle2simple1

This commit is contained in:
mvdbeek
2018-09-05 14:22:00 +02:00
parent df5cab38ae
commit 6352a0ef3e
+6 -3
View File
@@ -18,19 +18,22 @@ class UCSCOutWrapper(object):
def __iter__(self):
return self
def next(self):
def __next__(self):
if self.lookahead is None:
line = self.other.next()
line = next(self.other)
else:
line = self.lookahead
self.lookahead = None
if line.startswith("----------"):
next_line = self.other.next()
next_line = next(self.other)
if next_line.startswith("Reached output limit"):
raise UCSCLimitException(next_line.strip())
else:
self.lookahead = next_line
return line
def next(self):
return self.__next__()
def readline(self):
return self.next()