mirror of
https://github.com/romanz/amodem.git
synced 2026-02-07 18:08:03 +08:00
colorhash fix
This commit is contained in:
@@ -9,9 +9,9 @@ for line in lines:
|
||||
try:
|
||||
data = binascii.unhexlify(head)
|
||||
data = map(ord, data)
|
||||
bars = ['\033[48;5;%dm \033[m' % (x,) for x in data]
|
||||
bars = ''.join(bars)
|
||||
bars = ['\033[48;5;%dm%02x\033[m' % (x, x) for x in data]
|
||||
head = ''.join(bars)
|
||||
except TypeError:
|
||||
pass
|
||||
|
||||
print('%s: %s %s' % (bars, head, tail))
|
||||
print('%s %s' % (head, tail))
|
||||
|
||||
Reference in New Issue
Block a user