Permalink
Browse files

Fixed writable dir test on Python3

  • Loading branch information...
1 parent 4a77483 commit f828a59a1730eca6a1b34d52ec633fbd142d6502 @dvarrazzo committed Jul 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 pgxnclient/commands/install.py
@@ -17,7 +17,7 @@
from pgxnclient import SemVer
from pgxnclient.i18n import _, N_
-from pgxnclient.utils import sha1
+from pgxnclient.utils import sha1, b
from pgxnclient.errors import BadChecksum, PgxnClientException, InsufficientPrivileges
from pgxnclient.network import download
from pgxnclient.commands import Command, WithDatabase, WithMake, WithPgConfig
@@ -159,7 +159,7 @@ def is_libdir_writable(self):
logger.debug("testing if %s is writable", dir)
try:
f = tempfile.TemporaryFile(prefix="pgxn-", suffix=".test", dir=dir)
- f.write("test")
+ f.write(b('test'))
f.close()
except (IOError, OSError):
rv = False

0 comments on commit f828a59

Please sign in to comment.