Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/overlays/
Date: Mon, 26 Sep 2011 01:18:49
Message-Id: 1160eeb2569486785c0568cd84090e4029cc0747.dol-sen@gentoo
commit:     1160eeb2569486785c0568cd84090e4029cc0747
Author:     dol-sen <brian.dolbec <AT> gmail <DOT> com>
AuthorDate: Mon Sep 26 01:17:11 2011 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Mon Sep 26 01:17:11 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=1160eeb2

fix a py3 failure, because the file was not opened in binary mode.

---
 layman/overlays/tar.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/layman/overlays/tar.py b/layman/overlays/tar.py
index 5d66acc..c6f2443 100644
--- a/layman/overlays/tar.py
+++ b/layman/overlays/tar.py
@@ -118,7 +118,7 @@ class TarOverlay(OverlaySource):
         pkg = path([base, self.parent.name + ext])
 
         try:
-            out_file = open(pkg, 'w')
+            out_file = open(pkg, 'w+b')
             out_file.write(tar)
             out_file.close()
         except Exception, error: