[pacman-dev] [PATCH 2/2] util.py: replace file() with open()
Andrew Gregory
andrew.gregory.8 at gmail.com
Sun Apr 14 14:32:20 EDT 2013
open() is the standard way to open a file in python.
Signed-off-by: Andrew Gregory <andrew.gregory.8 at gmail.com>
---
test/pacman/util.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/pacman/util.py b/test/pacman/util.py
index be99cd5..65540ed 100644
--- a/test/pacman/util.py
+++ b/test/pacman/util.py
@@ -100,7 +100,7 @@ def mkfile(base, name, data=""):
def writedata(filename, data):
if isinstance(data, list):
data = "\n".join(data)
- fd = file(filename, "w")
+ fd = open(filename, "w")
if data:
fd.write(data)
if data[-1] != "\n":
--
1.8.2.1
More information about the pacman-dev
mailing list