Use explicit 'mode' keyword arg with io.open().
authorZac Medico <zmedico@gentoo.org>
Tue, 12 Jul 2011 19:48:45 +0000 (12:48 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 12 Jul 2011 19:48:45 +0000 (12:48 -0700)
pym/portage/dbapi/vartree.py

index bec3d6629a8970fc646e5782a7a6b6bbd116da2b..9efc47ff9d5637c7f405526dad4f4f7298ebba97 100644 (file)
@@ -3385,8 +3385,8 @@ class dblink(object):
                        counter = self.vartree.dbapi.counter_tick(mycpv=self.mycpv)
                io.open(_unicode_encode(os.path.join(self.dbtmpdir, 'COUNTER'),
                        encoding=_encodings['fs'], errors='strict'),
-                       'w', encoding=_encodings['repo.content'], errors='backslashreplace'
-                       ).write(_unicode_decode(str(counter)))
+                       mode='w', encoding=_encodings['repo.content'],
+                       errors='backslashreplace').write(_unicode_decode(str(counter)))
 
                self.updateprotect()