tags 593846 + upstream patch confirmed thanks On Sat, 2010-08-21 at 16:37 +0200, kardan wrote:
> Invoking iotop with an unavailable locale set, results in a traceback: Patch attached. -- bye, pabs http://wiki.debian.org/PaulWise
From f5252de8f7c25c8a285cbff3777de928fc24f9aa Mon Sep 17 00:00:00 2001 From: Paul Wise <[email protected]> Date: Sun, 22 Aug 2010 15:08:08 +0800 Subject: [PATCH] Fix traceback with an invalid locale. Closes: http://bugs.debian.org/593846 --- iotop/ui.py | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/iotop/ui.py b/iotop/ui.py index c281ace..dab0b03 100644 --- a/iotop/ui.py +++ b/iotop/ui.py @@ -512,7 +512,10 @@ option, a to toggle the --accumulated option, q to quit, any other key to force a refresh.''' % sys.argv[0] def main(): - locale.setlocale(locale.LC_ALL, '') + try: + locale.setlocale(locale.LC_ALL, '') + except locale.Error: + print 'unable to set locale, falling back to the default locale' parser = optparse.OptionParser(usage=USAGE, version='iotop ' + VERSION) parser.add_option('-o', '--only', action='store_true', dest='only', default=False, -- 1.7.1
signature.asc
Description: This is a digitally signed message part

