mirror of
https://github.com/beetbox/beets.git
synced 2025-12-23 00:54:03 +01:00
Fix print_ with no args (close #1478)
This commit is contained in:
parent
c93d5ce25b
commit
7c98c1aea1
1 changed files with 5 additions and 8 deletions
|
|
@ -123,15 +123,12 @@ def print_(*strings, **kwargs):
|
|||
"""
|
||||
end = kwargs.get('end')
|
||||
|
||||
if strings:
|
||||
if isinstance(strings[0], unicode):
|
||||
txt = u' '.join(strings)
|
||||
txt += u'\n' if end is None else end
|
||||
else:
|
||||
txt = b' '.join(strings)
|
||||
txt += b'\n' if end is None else end
|
||||
if not strings or isinstance(strings[0], unicode):
|
||||
txt = u' '.join(strings)
|
||||
txt += u'\n' if end is None else end
|
||||
else:
|
||||
txt = u''
|
||||
txt = b' '.join(strings)
|
||||
txt += b'\n' if end is None else end
|
||||
|
||||
# Always send bytes to the stdout stream.
|
||||
if isinstance(txt, unicode):
|
||||
|
|
|
|||
Loading…
Reference in a new issue