fix printing unicode strings in batch mode (#1285088)

This commit is contained in:
Michal Hlavinka 2016-11-14 14:19:26 +01:00
parent 32e49f39a2
commit 4184d203ad
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up iotop-0.6/iotop/ui.py.batchprintutf8 iotop-0.6/iotop/ui.py
--- iotop-0.6/iotop/ui.py.batchprintutf8 2016-11-14 11:21:23.690185257 +0100
+++ iotop-0.6/iotop/ui.py 2016-11-14 11:23:26.511040007 +0100
@@ -444,7 +444,7 @@ class IOTopUI(object):
if self.options.quiet <= int(first_time):
print(''.join(titles))
for l in lines:
- print(l)
+ print(l.encode('utf-8'))
sys.stdout.flush()
else:
self.win.erase()

View File

@ -1,6 +1,6 @@
Name: iotop
Version: 0.6
Release: 11%{?dist}
Release: 12%{?dist}
Summary: Top like utility for I/O
License: GPLv2+
URL: http://guichaz.free.fr/iotop/
@ -14,6 +14,9 @@ Patch1: iotop-0.6-python3.patch
# http://repo.or.cz/iotop.git/commit/99c8d7cedce81f17b851954d94bfa73787300599
Patch2: iotop-python3build.patch
# sent upstream, iotop <= 0.6, rhbz#1285088
Patch3: iotop-0.3.2-batchprintutf8.patch
BuildArch: noarch
BuildRequires: python3-devel
@ -28,6 +31,7 @@ show of behalf of which process is the I/O going on.
%patch0 -p1 -b .noendcurses
%patch1 -p1 -b .python3
%patch2 -p1
%patch3 -p1 -b .batchprintutf8
%build
%py3_build
@ -43,6 +47,9 @@ show of behalf of which process is the I/O going on.
%{_mandir}/man8/iotop.*
%changelog
* Mon Nov 14 2016 Michal Hlavinka <mhlavink@redhat.com> - 0.6-12
- fix printing unicode strings in batch mode (#1285088)
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-11
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages