Print ASCII version of unrepresentable text. Closes
@@ -539,6 +539,10 @@ Timeout: %4d
print('--- Listing only the last 100 lines from a long log. ---')
lines = lines[-100:]
for line in lines:
+ try:
+ print(line)
+ except UnicodeEncodeError:
+ line = line.encode('ascii', errors='replace').decode()
print(line)
def doit(self):
