Working on non-ascii characters in zipfiles

This commit is contained in:
Martin Thompson 2010-07-05 21:00:05 +01:00
parent 38ccc21f89
commit ab1f040aaa
2 changed files with 8 additions and 5 deletions

View File

@ -9,10 +9,10 @@ import codecs
def opensong_import_lots():
ziploc=u'/home/mjt/openlp/OpenSong_Data/'
files=[]
files=['test.opensong.zip']
files.extend(glob(ziploc+u'Songs.zip'))
files.extend(glob(ziploc+u'SOF.zip'))
# files.extend(glob(ziploc+u'spanish_songs_for_opensong.zip'))
files=[u'test.opensong.zip', ziploc+u'ADond.zip']
#files.extend(glob(ziploc+u'Songs.zip'))
#files.extend(glob(ziploc+u'SOF.zip'))
files.extend(glob(ziploc+u'spanish_songs_for_opensong.zip'))
# files.extend(glob(ziploc+u'opensong_*.zip'))
errfile=codecs.open(u'import_lots_errors.txt', u'w', u'utf8')
manager=SongManager()
@ -47,7 +47,7 @@ def opensong_import_lots():
print_exc(3)
sys.exit(1)
# continue
o.finish()
#o.finish()
print "OK"
#os.unlink(filename)
# o.song.print_song()

View File

@ -28,6 +28,9 @@ from openlp.plugins.songs.lib.manager import SongManager
def test():
manager = SongManager()
o = OpenSongImport(manager)
o.do_import(u'/home/mjt/openlp/OpenSong_Data/ADond', commit=False)
o.song.print_song()
sys.exit(1)
o.do_import(u'test.opensong', commit=False)
# o.finish()
o.song.print_song()