From 992ae9ccc6fabe660e3c02c27ab840338b8d90c2 Mon Sep 17 00:00:00 2001 From: Guillaume Chazarain Date: Mon, 30 Mar 2009 21:58:22 +0200 Subject: [PATCH] Properly sanitize the value in the error report --- iotop/ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iotop/ui.py b/iotop/ui.py index 5fed3b7..f0b5610 100644 --- a/iotop/ui.py +++ b/iotop/ui.py @@ -237,7 +237,8 @@ class IOTopUI(object): exc_type, value, traceback = sys.exc_info() value = '%s win:%s i:%d line:%s' % \ (value, self.win.getmaxyx(), i, lines[i]) - raise exc_type, value.encode('string_escape'), traceback + value = str(value).encode('string_escape') + raise exc_type, value, traceback self.win.refresh() def run_iotop_window(win, options): -- 2.11.4.GIT