Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 473772

Summary: net-misc/wicd-1.7.2.4-r2 - /usr/share/wicd/daemon/{suspend,autoconnect}.py fail with python3
Product: Gentoo Linux Reporter: August Hörandl <hoea>
Component: Current packagesAssignee: Thomas Kahle (RETIRED) <tomka>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description August Hörandl 2013-06-19 06:06:52 UTC
wicd comes with scripts to bring the connection up or down
 /usr/share/wicd/scripts/50-wicd-suspend.sh
 /usr/share/wicd/scripts/80-wicd-connect.sh

these scripts use
 /usr/share/wicd/daemon/suspend.py
 /usr/share/wicd/daemon/autoconnect.py

which have the first line
 #!/usr/bin/env python

If `env pyton` is python3 this scripts fail.

One solution is to add
  exec /usr/bin/python2 -O 
to the scripts in /usr/share/wicd/scripts
Comment 1 Thomas Kahle (RETIRED) gentoo-dev 2013-06-24 22:04:43 UTC
I don't know why distutils-r1 does not contain a function to fix shebangs... that's why I solved this with sed call.  In the end the scripts 

/usr/share/wicd/daemon/suspend.py
/usr/share/wicd/daemon/autoconnect.py
/usr/share/wicd/daemon/monitor.py

call python2 directly now.  Please test and reopen if you still have problem.s