From 4184d203ad4635a39fb79ba22986357785a4a961 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Mon, 14 Nov 2016 14:19:26 +0100 Subject: [PATCH] fix printing unicode strings in batch mode (#1285088) --- iotop-0.3.2-batchprintutf8.patch | 12 ++++++++++++ iotop.spec | 9 ++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 iotop-0.3.2-batchprintutf8.patch diff --git a/iotop-0.3.2-batchprintutf8.patch b/iotop-0.3.2-batchprintutf8.patch new file mode 100644 index 0000000..4e63bc0 --- /dev/null +++ b/iotop-0.3.2-batchprintutf8.patch @@ -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() diff --git a/iotop.spec b/iotop.spec index 7a24451..40c582a 100644 --- a/iotop.spec +++ b/iotop.spec @@ -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 - 0.6-12 +- fix printing unicode strings in batch mode (#1285088) + * Tue Jul 19 2016 Fedora Release Engineering - 0.6-11 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages