Bug 4605 - command-not-found seems confused
: command-not-found seems confused
Status: RESOLVED FIXED
Product: Desktop Bugs
Classification: ROSA Desktop
Component: Main Packages
: Fresh
: All Linux
: Normal normal
: ---
Assigned To: ROSA Linux Bugs
: ROSA Linux Bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-31 18:31 MSK by luca
Modified: 2014-11-06 17:12 MSK (History)
1 user (show)

See Also:
RPM Package:
ISO-related:
Bad POT generating:
Upstream:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description luca 2014-10-31 18:31:29 MSK
Description of problem:

w_scan was not installed, but cnf seems in trouble.....

$ w_scan -X -P -t 2 -E 0 -c IT > ~/dvb-channels.conf
Traceback (most recent call last):
  File "/usr/bin/cnf", line 12, in <module>
    outf = codecs.getwriter(sys.stdout.encoding)(sys.stdout, errors='replace')
  File "/usr/lib64/python2.7/codecs.py", line 991, in getwriter
    return lookup(encoding).streamwriter
TypeError: must be string, not None


Version-Release number of selected component (if applicable):

$ rpm -aq | grep command
command-not-found-data-2013.02.21-3-rosa2014.1.noarch
command-not-found-1.2-7-rosa2014.1.noarch
Comment 1 Denis Silakov 2014-11-05 20:31:27 MSK
The trouble is in output redirection to file. If you drop '> ~/dvb-channels.conf' from the end of line, everything will be fine.

I'll try to improve this behavior.
Comment 2 Denis Silakov 2014-11-05 23:38:55 MSK
Should be fixed in version 1.3/
Comment 3 luca 2014-11-06 15:53:43 MSK
does not seem properly fixed.

in my example the file "dvb-channels.conf" is created even if there is no w_scan installed

it contains the last part of the message
Comment 4 Denis Silakov 2014-11-06 17:00:09 MSK
Surely, this file is created. cnf can't prevent this by design, since shell first creates this file and only after this tries to launch w_scan redirecting all stdout to that file.

This is how shell works, and cnf can't affect this behavior.
Comment 5 luca 2014-11-06 17:12:15 MSK
yes, you are right.
thanks, Luca.