Blame SOURCES/iotop-0.6-noendcurses.patch

400d7d
diff -up iotop-0.6/iotop/ui.py.noendcurses iotop-0.6/iotop/ui.py
400d7d
--- iotop-0.6/iotop/ui.py.noendcurses	2014-12-03 17:50:38.941430261 +0100
400d7d
+++ iotop-0.6/iotop/ui.py	2014-12-03 17:51:40.108064465 +0100
400d7d
@@ -520,6 +525,17 @@ Please do not file bugs on iotop about t
400d7d
             sys.exit(1)
400d7d
         else:
400d7d
             raise
400d7d
+    except curses.error as e:
400d7d
+        stre = str(e)
400d7d
+        if stre.find('ERR')>=0 and (
400d7d
+            stre.find('nocbreak()')>=0 or stre.find('endwin()')>=0
400d7d
+            ):
400d7d
+            pass
400d7d
+            # endwin and nocbreak can cause error (and raise hard to catch 
400d7d
+            # exception) if iotop was running in the terminal and that 
400d7d
+            # terminal got closed while iotop was still running
400d7d
+        else:
400d7d
+            raise
400d7d
 
400d7d
 #
400d7d
 # Profiling