Use open() instead of file(), for python3.
authorZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 18:42:30 +0000 (11:42 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 18:42:30 +0000 (11:42 -0700)
pym/portage/tests/resolver/ResolverPlayground.py

index bcd6b52c29d2462a05e0dcefb6e17c08b9148e8b..6d00270b1ddc327e6c9d8c22e35a862f6932bcad 100644 (file)
@@ -223,7 +223,7 @@ class ResolverPlayground(object):
                                raise ValueError("Unknown config file: '%s'" % config_file)
 
                        file_name = os.path.join(user_config_dir, config_file)
-                       f = file(file_name, "w")
+                       f = open(file_name, "w")
                        for line in lines:
                                f.write("%s\n" % line)
                        f.close()
@@ -248,7 +248,7 @@ class ResolverPlayground(object):
 
                for sets_file, lines in sets.items():
                        file_name = os.path.join(set_config_dir, sets_file)
-                       f = file(file_name, "w")
+                       f = open(file_name, "w")
                        for line in lines:
                                f.write("%s\n" % line)
                        f.close()