Show
Ignore:
Timestamp:
08/17/08 15:19:39 (5 months ago)
Author:
Jonny Lamb <jonnylamb@…>
Parents:
6743f68457b7c15796432836bce3918cd8fd907a
Children:
d9ffc7e53b1210c740693d1de2b0143921114cc2
git-committer:
Jonny Lamb <jonnylamb@jonnylamb.com> / 2008-08-17T14:19:39Z+0100
Message:

Removed DecodingFile? class; it doesn't fix the unicode problem.

Signed-off-by: Jonny Lamb <jonnylamb@…>

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • debexpo/lib/utils.py

    r11b680 r63e947  
    106106 
    107107    return sum.hexdigest() 
    108  
    109 class DecodingFile(file): 
    110     """ 
    111     Wrapper class to open a file and read it as a specific encoding. This 
    112     is a horrible hack and should be deprecated when deb822 is fixed. 
    113     See Debian bug #495272 for more details. 
    114     """ 
    115     def __init__(self, name, mode='r', buffering=1, encoding='utf8'): 
    116         file.__init__(self, name, mode, buffering) 
    117         self._encoding = encoding 
    118  
    119     def read(self, n=-1): 
    120         data = file.read(self, n) 
    121         return data.decode(self._encoding) 
    122  
    123     def readline(self): 
    124         data = file.readline(self) 
    125         return data.decode(self._encoding)