summaryrefslogtreecommitdiffstats
path: root/toprammer
diff options
context:
space:
mode:
authorMichael Buesch <m@bues.ch>2012-04-25 20:21:19 +0200
committerMichael Buesch <m@bues.ch>2012-04-25 20:21:19 +0200
commitc8edb8fd0b558fefbc181aea301e147262a3e8aa (patch)
treec42561e7b2ec0247066754c1a890fa2d1a10d1b4 /toprammer
parent91ae49d11a7ea26434fc169f724944f722ac3d37 (diff)
downloadtoprammer-c8edb8fd0b558fefbc181aea301e147262a3e8aa.tar.xz
toprammer-c8edb8fd0b558fefbc181aea301e147262a3e8aa.zip
Use open() instead of file()
Signed-off-by: Michael Buesch <m@bues.ch>
Diffstat (limited to 'toprammer')
-rwxr-xr-xtoprammer8
1 files changed, 4 insertions, 4 deletions
diff --git a/toprammer b/toprammer
index 2c1c7f8..dab17fb 100755
--- a/toprammer
+++ b/toprammer
@@ -89,19 +89,19 @@ IO_handlers = {
"ahex" : IO_ahex,
}
-def fileOut(filename, format, data):
- handler = IO_handlers[format]()
+def fileOut(filename, fmtString, data):
+ handler = IO_handlers[fmtString]()
data = handler.fromBinary(data)
if filename == "-":
sys.stdout.write(data)
else:
- file(filename, "w+b").write(data)
+ open(filename, "w+b").write(data)
def fileIn(filename, fmtString):
if filename == "-":
data = sys.stdin.read()
else:
- data = file(filename, "rb").read()
+ data = open(filename, "rb").read()
if fmtString == "auto":
handler = IO_autodetect(data)()
else:
bues.ch cgit interface