[issue52] smart info UnicodeEncodeError

Ben Severs at Labix Tracker tracker at labix.org
Tue Dec 6 06:53:53 PST 2005


Ben Severs <benjaminsevers at gmail.com> added the comment:

The only variable set is LANG and it is set to: en_US.UTF-8

This is the rpm -qi for the package (policycoreutils) I believe is crashing it.

Name        : policycoreutils              Relocations: /usr
Version     : 1.18.1                            Vendor: Red Hat, Inc.
Release     : 4.3                           Build Date: Tue 01 Mar 2005 10:55:22
AM EST
Install Date: Thu 27 Oct 2005 07:12:07 PM EDT      Build Host:
dolly.build.redhat.com
Group       : System Environment/Base       Source RPM:
policycoreutils-1.18.1-4.3.src.rpm
Size        : 92425                            License: GPL
Signature   : DSA/SHA1, Mon 25 Apr 2005 05:50:49 PM EDT, Key ID 219180cddb42a60e
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : SELinux policy core utilities.
Description :
Security-enhanced Linux is a patch of the Linux® kernel and a number
of utilities with enhanced security functionality designed to add
mandatory access controls to Linux.  The Security-enhanced Linux
kernel contains new architectural components originally developed to
improve the security of the Flask operating system. These
architectural components provide general support for the enforcement
of many kinds of mandatory access control policies, including those
based on the concepts of Type Enforcement®, Role-based Access
Control, and Multi-level Security.

policycoreutils contains the policy core utilities that are required
for basic operation of a SELinux system.  These utilities include
load_policy to load policies, setfiles to label filesystems, newrole
to switch roles, and run_init to run /etc/init.d scripts in the proper
context.

It dies when it hits the description field.  I'm guessing its the ® characters
that it is having problems with.  Something else to note is that smart has no
problem with "smart info policycoreutils" The problem only arises when I do a
full listing using just "smart info".

When I direct the output of "smart info" to a log, this is what I'm seeing:

Name: policycoreutils
Version: 1.18.1-4.7 at i386
Priority: 0
Group: System Environment/Base
Installed Size: 74.8kB
Reference URLs:
Flags:
Channels: kickstart
Summary: SELinux policy core utilities.
Description:
 Traceback (most recent call last):
  File "/usr/bin/smart", line 193, in ?
    main(sys.argv[1:])
  File "/usr/bin/smart", line 166, in main
    exitcode = iface.run(opts.command, opts.argv)
  File "/usr/lib64/python2.3/site-packages/smart/interface.py", line 53, in run
    result = _command.main(self._ctrl, opts)
  File "/usr/lib64/python2.3/site-packages/smart/commands/info.py", line 131, in
main
    print "", line
UnicodeEncodeError: 'ascii' codec can't encode character u'\xae' in position 47:
ordinal not in range(128)

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue52>
_______________________________________



More information about the Smart mailing list