mirror of
https://github.com/michaelcmartin/Ophis.git
synced 2024-09-07 13:54:30 +00:00
Fix the listing/map output to be Python 3 compatible
This commit is contained in:
parent
41bf01d035
commit
99f074da27
@ -40,7 +40,7 @@ class Listing(object):
|
||||
if self.filename == "-":
|
||||
out = sys.stdout
|
||||
else:
|
||||
out = file(self.filename, "w")
|
||||
out = open(self.filename, "wt")
|
||||
for x in self.listing:
|
||||
if type(x) is str:
|
||||
print(x, file=out)
|
||||
@ -118,7 +118,7 @@ class LabelMapper(object):
|
||||
if self.filename == "-":
|
||||
out = sys.stdout
|
||||
else:
|
||||
out = file(self.filename, "w")
|
||||
out = open(self.filename, "wt")
|
||||
maxlabellen = 0
|
||||
self.labeldata.sort()
|
||||
for (loc, label, srcloc) in self.labeldata:
|
||||
|
Loading…
Reference in New Issue
Block a user