Bug 1109896 - /etc/zsh-command-not-found executing python 2 instead of python 3.
/etc/zsh-command-not-found executing python 2 instead of python 3.
Status: RESOLVED FIXED
: 1110266 (view as bug list)
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
64bit openSUSE Factory
: P5 - None : Minor (vote)
: ---
Assigned To: Bernhard Wiedemann
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-09-26 16:47 UTC by Larry Dewey
Modified: 2018-10-05 12:54 UTC (History)
1 user (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Dewey 2018-09-26 16:47:49 UTC
It looks like after upgrading the code for /usr/bin/command-not-found to Python 3 that the zsh function was not.

Actual Results:
---------------
~ >> foo
  File "/usr/bin/command-not-found", line 14
    print(file=sys.stderr)
              ^
SyntaxError: invalid syntax

~ >> 

Expected Results:
-----------------
~ >> foo
  foo: command not found

~ >>


In /etc/zsh_command_not_found, within the command_not_found_handler function it reads:

line 5:  if [ -x /usr/bin/python ] && [ -x /usr/bin/command-not-found ]; then
line 9:    /usr/bin/python /usr/bin/command-not-found "${(Q)1}" zypp

when it should be:

line 5:  if [ -x /usr/bin/python3 ] && [ -x /usr/bin/command-not-found ]; then
line 9:    /usr/bin/python3 /usr/bin/command-not-found "${(Q)1}" zypp
Comment 1 Andreas Stieger 2018-10-01 07:15:25 UTC
*** Bug 1110266 has been marked as a duplicate of this bug. ***
Comment 2 Bernhard Wiedemann 2018-10-01 12:47:44 UTC
https://build.opensuse.org/request/show/636647
was accepted into Factory today.
Can you please re-test with this new version (once it hits Tumbleweed)?
Comment 3 Marguerite Su 2018-10-01 14:15:49 UTC
works for me
Comment 4 Larry Dewey 2018-10-01 16:21:35 UTC
(In reply to Bernhard Wiedemann from comment #2)
> https://build.opensuse.org/request/show/636647
> was accepted into Factory today.
> Can you please re-test with this new version (once it hits Tumbleweed)?

Absolutely! I will keep an eye out for the update to appear in the next tumbleweed release and will update this once I have tested it.
Comment 5 Larry Dewey 2018-10-04 22:24:40 UTC
After getting the 20181001 tumbleweed update, it looks like everything is behaving as it should be. Thanks for all your hard work! You are welcome to close this, or I can close it if you wish.
Comment 6 Bernhard Wiedemann 2018-10-05 12:54:51 UTC
fixed in 20181001