mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 11:02:43 +01:00
cast year ints to str, not bytes in bucket plugin
This seems to work equally well in py2/3
This commit is contained in:
parent
7df59d5e30
commit
a02a1f0201
1 changed files with 3 additions and 2 deletions
|
|
@ -137,9 +137,10 @@ def str2fmt(s):
|
|||
def format_span(fmt, yearfrom, yearto, fromnchars, tonchars):
|
||||
"""Return a span string representation.
|
||||
"""
|
||||
args = (bytes(yearfrom)[-fromnchars:])
|
||||
args = (str(yearfrom)[-fromnchars:])
|
||||
if tonchars:
|
||||
args = (bytes(yearfrom)[-fromnchars:], bytes(yearto)[-tonchars:])
|
||||
args = (str(yearfrom)[-fromnchars:], str(yearto)[-tonchars:])
|
||||
|
||||
return fmt % args
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue