fix bug 400071

This commit is contained in:
drago01 2007-12-28 13:43:30 +00:00
parent cbc951802c
commit fc5c54536b
2 changed files with 24 additions and 1 deletions

View File

@ -1,18 +1,20 @@
Name: iotop Name: iotop
Version: 0.1 Version: 0.1
Release: 1%{?dist} Release: 2%{?dist}
Summary: Top like utility for I/O Summary: Top like utility for I/O
Group: Applications/System Group: Applications/System
License: GPLv2 License: GPLv2
URL: http://guichaz.free.fr/misc/#iotop URL: http://guichaz.free.fr/misc/#iotop
Source0: http://guichaz.free.fr/misc/%{name}.py Source0: http://guichaz.free.fr/misc/%{name}.py
Patch0: xterm-color-fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
Requires: python Requires: python
%prep %prep
%patch0 -p0 -b .xterm-color
%build %build
@ -39,6 +41,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Dec 28 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.1-2
- Fix traceback on xterm-color RH #400071
* Sun Nov 3 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.1-1 * Sun Nov 3 2007 Adel Gadllah <adel.gadllah@gmail.com> 0.1-1
- Fix version - Fix version

18
xterm-color-fix.patch Normal file
View File

@ -0,0 +1,18 @@
--- iotop.py.orign 2007-11-03 18:46:19.000000000 +0100
+++ iotop.py 2007-12-28 14:37:05.000000000 +0100
@@ -440,9 +440,12 @@
if not self.options.batch:
self.win = win
self.resize()
- curses.use_default_colors()
- curses.start_color()
- curses.curs_set(0)
+ try:
+ curses.use_default_colors()
+ curses.start_color()
+ curses.curs_set(0)
+ except:
+ pass
def resize(self):
self.height, self.width = self.win.getmaxyx()