From eeb63d7ba9ca816059cf58ae13861800521758bc 2008-03-10 15:51:50 From: Ville M. Vainio Date: 2008-03-10 15:51:50 Subject: [PATCH] update_revnum opens the file in binary mode (does not botch CRLF) --- diff --git a/IPython/Release.py b/IPython/Release.py index d49b2e0..45b29ee 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -22,7 +22,7 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -revision = '45' +revision = '46' version = '0.8.3.bzr.r' + revision diff --git a/tools/update_revnum.py b/tools/update_revnum.py index b405036..87e4f0b 100755 --- a/tools/update_revnum.py +++ b/tools/update_revnum.py @@ -9,6 +9,6 @@ rev = os.popen('bzr revno').read().strip() print "current rev is",rev assert ':' not in rev -rfile = open('../IPython/Release.py').read() +rfile = open('../IPython/Release.py','rb').read() newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % rev, rfile) -open('../IPython/Release.py','w').write(newcont) +open('../IPython/Release.py','wb').write(newcont)