Address errors, improvements, formatting

- Removed unused code not portable due to buffer() use
- raw_input() does not exist in Python 3
- Fixed octal constant syntax for Python 3
- Fixed TypeError
- Replace if not exists: makedirs(path) with single call: using makedirs(path, exist_ok=True)
- Class inherits from object, can be safely removed from bases in python3: pylint's useless-object-inheritance (W0235) check

Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
This commit is contained in:
JoeLametta
2019-08-10 09:10:00 +00:00
parent 8446c290e7
commit 35201d5290
18 changed files with 31 additions and 65 deletions

View File

@@ -333,7 +333,7 @@ class Program:
if prompt:
guess = (deltas[lowest])[0].mbid
release = raw_input(
release = input(
"\nPlease select a release [%s]: " % guess)
if not release:
@@ -505,8 +505,7 @@ class Program:
stop = self.result.table.getTrackEnd(trackResult.number)
dirname = os.path.dirname(trackResult.filename)
if not os.path.exists(dirname):
os.makedirs(dirname)
os.makedirs(dirname, exist_ok=True)
if not what:
what = 'track %d' % (trackResult.number, )