[Python-checkins] python/dist/src/Lib wave.py,1.17,1.18
nnorwitz at users.sourceforge.net
nnorwitz at users.sourceforge.net
Mon Aug 2 00:48:08 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14787/Lib
Modified Files:
wave.py
Log Message:
Fix SF #1001053, wave.open() with unicode filename fails
Backport candidate.
Index: wave.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/wave.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** wave.py 12 Feb 2004 17:35:07 -0000 1.17
--- wave.py 1 Aug 2004 22:48:06 -0000 1.18
***************
*** 156,160 ****
def __init__(self, f):
self._i_opened_the_file = None
! if type(f) == type(''):
f = __builtin__.open(f, 'rb')
self._i_opened_the_file = f
--- 156,160 ----
def __init__(self, f):
self._i_opened_the_file = None
! if isinstance(f, basestring):
f = __builtin__.open(f, 'rb')
self._i_opened_the_file = f
***************
*** 295,299 ****
def __init__(self, f):
self._i_opened_the_file = None
! if type(f) == type(''):
f = __builtin__.open(f, 'wb')
self._i_opened_the_file = f
--- 295,299 ----
def __init__(self, f):
self._i_opened_the_file = None
! if isinstance(f, basestring):
f = __builtin__.open(f, 'wb')
self._i_opened_the_file = f
More information about the Python-checkins
mailing list