mirror of
https://github.com/freedoom/freedoom.git
synced 2025-08-31 20:16:55 -04:00
music-duplicates: python3 compatibility
Open files in binary mode instead of text mode.
This commit is contained in:
parent
60cf1dee6e
commit
140f01f39a
1 changed files with 1 additions and 2 deletions
|
@ -20,7 +20,7 @@ def get_music_tracks():
|
|||
result = {}
|
||||
musics_path = os.path.join(os.path.dirname(sys.argv[0]), '../musics')
|
||||
for mus in glob('%s/*.mid' % musics_path):
|
||||
with open(mus) as f:
|
||||
with open(mus, 'rb') as f:
|
||||
contents = f.read()
|
||||
m = hashlib.sha1()
|
||||
m.update(contents)
|
||||
|
@ -81,4 +81,3 @@ print_report('Phase 1 tracks:', phase1_tracks)
|
|||
print_report('Phase 2 tracks:', phase2_tracks)
|
||||
print_report('FreeDM tracks:', freedm_tracks)
|
||||
print_report('Other tracks:', other_tracks)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue