[py-svn] r22586 - in py/dist/py/path: local svn
arigo at codespeak.net
arigo at codespeak.net
Tue Jan 24 13:34:21 CET 2006
Author: arigo
Date: Tue Jan 24 13:34:19 2006
New Revision: 22586
Modified:
py/dist/py/path/local/local.py
py/dist/py/path/svn/wccommand.py
Log:
Added a "mode='wb'" argument to the write() methods of paths.
Modified: py/dist/py/path/local/local.py
==============================================================================
--- py/dist/py/path/local/local.py (original)
+++ py/dist/py/path/local/local.py Tue Jan 24 13:34:19 2006
@@ -253,10 +253,10 @@
self._callex(os.mkdir, str(p))
return p
- def write(self, content):
+ def write(self, content, mode='wb'):
""" write string content into path. """
s = str(content)
- f = self.open('wb')
+ f = self.open(mode)
try:
f.write(s)
finally:
Modified: py/dist/py/path/svn/wccommand.py
==============================================================================
--- py/dist/py/path/svn/wccommand.py (original)
+++ py/dist/py/path/svn/wccommand.py Tue Jan 24 13:34:19 2006
@@ -102,9 +102,9 @@
""" update working copy item to given revision. (None -> HEAD). """
self._svn('up -r %s' % rev)
- def write(self, content):
+ def write(self, content, mode='wb'):
""" write content into local filesystem wc. """
- self.localpath.write(content)
+ self.localpath.write(content, mode)
def dirpath(self, *args):
""" return the directory Path of the current Path. """
More information about the pytest-commit
mailing list