In Python 3 print is a function
This commit is contained in:
@@ -333,7 +333,7 @@ Log files will log the path to tracks relative to this directory.
|
||||
sys.stdout.write("output directory %s already exists\n" %
|
||||
dirname.encode('utf-8'))
|
||||
else:
|
||||
print("creating output directory %s" % dirname.encode('utf-8'))
|
||||
print(("creating output directory %s" % dirname.encode('utf-8')))
|
||||
os.makedirs(dirname)
|
||||
|
||||
# FIXME: turn this into a method
|
||||
@@ -460,14 +460,14 @@ Log files will log the path to tracks relative to this directory.
|
||||
htoa = self.program.getHTOA()
|
||||
if htoa:
|
||||
start, stop = htoa
|
||||
print('found Hidden Track One Audio from frame %d to %d' % (
|
||||
start, stop))
|
||||
print(('found Hidden Track One Audio from frame %d to %d' % (
|
||||
start, stop)))
|
||||
_ripIfNotRipped(0)
|
||||
|
||||
for i, track in enumerate(self.itable.tracks):
|
||||
# FIXME: rip data tracks differently
|
||||
if not track.audio:
|
||||
print('skipping data track %d, not implemented' % (i + 1))
|
||||
print(('skipping data track %d, not implemented' % (i + 1)))
|
||||
# FIXME: make it work for now
|
||||
track.indexes[1].relative = 0
|
||||
continue
|
||||
|
||||
@@ -79,7 +79,7 @@ Retags the image from the given .cue files with tags obtained from MusicBrainz.
|
||||
prompt=self.options.prompt)
|
||||
|
||||
if not prog.metadata:
|
||||
print 'Not in MusicBrainz database, skipping'
|
||||
print('Not in MusicBrainz database, skipping')
|
||||
continue
|
||||
|
||||
prog.metadata.discid = mbdiscid
|
||||
@@ -98,10 +98,10 @@ Retags the image from the given .cue files with tags obtained from MusicBrainz.
|
||||
runner.run(t)
|
||||
path = os.path.basename(path)
|
||||
if t.changed:
|
||||
print 'Retagged %s' % path
|
||||
print('Retagged %s' % path)
|
||||
else:
|
||||
print '%s already tagged correctly' % path
|
||||
print
|
||||
print('%s already tagged correctly' % path)
|
||||
print()
|
||||
|
||||
|
||||
class Verify(BaseCommand):
|
||||
|
||||
@@ -105,5 +105,5 @@ You can get help on subcommands by using the -h option to the subcommand.
|
||||
self.parser.print_help()
|
||||
sys.exit(0)
|
||||
if self.options.version:
|
||||
print "whipper %s" % whipper.__version__
|
||||
print("whipper %s" % whipper.__version__)
|
||||
sys.exit(0)
|
||||
|
||||
@@ -19,26 +19,26 @@ Example disc id: KnpGsLhvH.lPrNc1PBL21lb9Bg4-"""
|
||||
try:
|
||||
discId = unicode(self.options.mbdiscid)
|
||||
except IndexError:
|
||||
print 'Please specify a MusicBrainz disc id.'
|
||||
print('Please specify a MusicBrainz disc id.')
|
||||
return 3
|
||||
|
||||
metadatas = musicbrainz(discId)
|
||||
|
||||
print '%d releases' % len(metadatas)
|
||||
print('%d releases' % len(metadatas))
|
||||
for i, md in enumerate(metadatas):
|
||||
print '- Release %d:' % (i + 1, )
|
||||
print ' Artist: %s' % md.artist.encode('utf-8')
|
||||
print ' Title: %s' % md.title.encode('utf-8')
|
||||
print ' Type: %s' % md.releaseType.encode('utf-8') # noqa: E501
|
||||
print ' URL: %s' % md.url
|
||||
print ' Tracks: %d' % len(md.tracks)
|
||||
print('- Release %d:' % (i + 1, ))
|
||||
print(' Artist: %s' % md.artist.encode('utf-8'))
|
||||
print(' Title: %s' % md.title.encode('utf-8'))
|
||||
print(' Type: %s' % md.releaseType.encode('utf-8')) # noqa: E501
|
||||
print(' URL: %s' % md.url)
|
||||
print(' Tracks: %d' % len(md.tracks))
|
||||
if md.catalogNumber:
|
||||
print ' Cat no: %s' % md.catalogNumber
|
||||
print(' Cat no: %s' % md.catalogNumber)
|
||||
if md.barcode:
|
||||
print ' Barcode: %s' % md.barcode
|
||||
print(' Barcode: %s' % md.barcode)
|
||||
|
||||
for j, track in enumerate(md.tracks):
|
||||
print ' Track %2d: %s - %s' % (
|
||||
print(' Track %2d: %s - %s' % (
|
||||
j + 1, track.artist.encode('utf-8'),
|
||||
track.title.encode('utf-8')
|
||||
)
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user