Package: iotop
Version: 0.4-2+squeeze1
Severity: normal

When invoked on a server that does not share my locale settings, iotop
simply refuses to launch until I force the locale to something that exists
on the system.

Traceback (most recent call last):
  File "/usr/bin/iotop", line 16, in <module>
    main()
  File "/usr/lib/pymodules/python2.6/iotop/ui.py", line 506, in main
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python2.6/locale.py", line 513, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

letting the application crash because of unknown locale should not be a good 
default.
instead it should default to C

I believe this behaviour is related to python's locale module's behaviour,
and the locale.Error exception should be catched when calling _setlocale so that
iotop can default to the "C" locale when it is not able to set the correct one.

-- System Information:
Debian Release: 6.0.6
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-xen-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=locale: Cannot set 
LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
ANSI_X3.4-1968) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash

Versions of packages iotop depends on:
ii  python [python-ctypes]  2.6.6-3+squeeze7 interactive high-level object-orie
ii  python-support          1.0.10           automated rebuilding support for P

iotop recommends no packages.

iotop suggests no packages.

-- debconf information:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = "en_US.utf8",
        LC_TIME = "fr_CA.UTF-8",
        LANG = "en_US.utf8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to