mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 11:32:30 +01:00
Rollback ui.print_() auto-conv of args to string
Since this raises problems the best is probably to maintain the base behaviour: expect byte strings or unicodes.
This commit is contained in:
parent
4e904c78af
commit
4aba4320e6
2 changed files with 2 additions and 8 deletions
|
|
@ -102,12 +102,6 @@ def print_(*strings):
|
|||
either bytes or unicode.
|
||||
"""
|
||||
if strings:
|
||||
if not isinstance(strings[0], basestring):
|
||||
try:
|
||||
strings = map(unicode, strings)
|
||||
except UnicodeError:
|
||||
strings = map(bytes, strings)
|
||||
|
||||
if isinstance(strings[0], unicode):
|
||||
txt = u' '.join(strings)
|
||||
else:
|
||||
|
|
@ -571,7 +565,7 @@ def show_model_changes(new, old=None, fields=None, always=False):
|
|||
|
||||
# Print changes.
|
||||
if changes or always:
|
||||
print_(old)
|
||||
print_(format(old))
|
||||
if changes:
|
||||
print_(u'\n'.join(changes))
|
||||
|
||||
|
|
|
|||
|
|
@ -994,7 +994,7 @@ def update_items(lib, query, album, move, pretend):
|
|||
for item in items:
|
||||
# Item deleted?
|
||||
if not os.path.exists(syspath(item.path)):
|
||||
ui.print_(item)
|
||||
ui.print_(format(item))
|
||||
ui.print_(ui.colorize('red', u' deleted'))
|
||||
if not pretend:
|
||||
item.remove(True)
|
||||
|
|
|
|||
Loading…
Reference in a new issue