Fix a warning which was created by previous fix. Codecs returns unicode and it could not be compared to such a str.

bzr-revno: 1848
This commit is contained in:
Mattias Põldaru 2011-12-21 11:53:23 +02:00 committed by Raoul Snyman
commit 856bc82045

View File

@ -75,7 +75,7 @@ class CCLIFileImport(SongImport):
details = chardet.detect(detect_content) details = chardet.detect(detect_content)
detect_file.close() detect_file.close()
infile = codecs.open(filename, u'r', details['encoding']) infile = codecs.open(filename, u'r', details['encoding'])
if not infile.read(3) == '\xEF\xBB\xBF': if not infile.read(1) == u'\ufeff':
# not UTF or no BOM was found # not UTF or no BOM was found
infile.seek(0) infile.seek(0)
lines = infile.readlines() lines = infile.readlines()