From: Zac Medico Date: Tue, 12 Jul 2011 19:48:45 +0000 (-0700) Subject: Use explicit 'mode' keyword arg with io.open(). X-Git-Tag: v2.2.0_alpha44~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e38c55ac49dcbd004ebbc65fd28053198b521ce8;p=portage.git Use explicit 'mode' keyword arg with io.open(). --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index bec3d6629..9efc47ff9 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -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()