dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 8a3965f81d3fd2c194da7426361f156f9c99e40b
parent 9c87d11a8f3a3a95f938545f1233d0622945785b
Author: rsiddharth <s@ricketyspace.net>
Date:   Tue, 12 Dec 2017 04:14:26 +0000

.bin/tagmp3album: Upgrade to python3.

Diffstat:
.bin/tagmp3album | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/.bin/tagmp3album b/.bin/tagmp3album @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Copyright (C) 2016 rsiddharth <s@ricketyspace.net> # @@ -37,11 +37,11 @@ def read_file(filename): content = '' try: - with open(filename, 'rb') as f: + with open(filename, 'r') as f: for line in f: content = content + line except IOError: - print "Error: unable to open %s" % filename + print('Error: unable to open {}'.format(filename)) return content @@ -50,7 +50,7 @@ def json_read(filename): """Deserialize JSON formatted `str` from `filename` into Python object. """ if not path.isfile(filename): - print '%s not found. Quitting' % filename + print('{} not found. Quitting'.format(filename)) exit(1) return json.loads(read_file(filename), @@ -72,10 +72,10 @@ def contains_all_words(filename, words): def print_tracks_not_found(tracks): """Print tracks whose file where not found. """ - print 'Track(s) not found:' + print('Track(s) not found:') for track in tracks: - print track + print(track) def track_path(dir_path, title):