[synthclone] push by surfacep...@gmail.com - Use open() instead of file() so that synthclone can be installed on sy... on 2013-09-14 22:38 GMT

2 views
Skip to first unread message

synth...@googlecode.com

unread,
Sep 14, 2013, 6:38:23 PM9/14/13
to synthclone-...@googlegroups.com
Revision: 8f5b06d6fa96
Author: Devin Anderson <surface...@gmail.com>
Date: Sat Sep 14 22:37:51 2013 UTC
Log: Use open() instead of file() so that synthclone can be installed
on systems that use a Python 3 interpreter as the default Python
interpreter.

http://code.google.com/p/synthclone/source/detail?r=8f5b06d6fa96

Modified:
/install/build-debian-packages
/install/util.py

=======================================
--- /install/build-debian-packages Tue Aug 21 15:37:29 2012 UTC
+++ /install/build-debian-packages Sat Sep 14 22:37:51 2013 UTC
@@ -64,7 +64,7 @@
# Copy .deb files to destination directory.
if not isdir(destinationDir):
makedirs(destinationDir)
- fp = file(join(debianDir, "files"))
+ fp = open(join(debianDir, "files"))
try:
while True:
line = fp.readline()
=======================================
--- /install/util.py Fri Dec 21 07:27:28 2012 UTC
+++ /install/util.py Sat Sep 14 22:37:51 2013 UTC
@@ -1,4 +1,4 @@
-from gzip import open
+from gzip import open as openGzip
from os import chdir, getcwd, makedirs, pardir, sep
from os.path import abspath, dirname, isdir, join
from platform import mac_ver, win32_ver
@@ -18,7 +18,7 @@
(win32_ver()[0] and PLATFORM_WIN32) or PLATFORM_UNIX

def createSourcePackage(path):
- gzipStream = open(filename=path, mode="wb")
+ gzipStream = openGzip(filename=path, mode="wb")
try:
gitArgs = ["git", "archive", "--format=tar",
"--prefix=synthclone-%s%s" % (VERSION, sep), "HEAD"]
@@ -63,13 +63,13 @@
sourceDir = dirname(source)
if not isdir(sourceDir):
makedirs(sourceDir)
- fp = file(source)
+ fp = open(source)
try:
s = fp.read()
finally:
fp.close()
s = Template(s).substitute(data)
- fp = file(destination, 'w')
+ fp = open(destination, 'w')
try:
fp.write(s)
finally:
Reply all
Reply to author
Forward
0 new messages