Public bug reported:

At least one Python script (/usr/share/oneconf) uses Python 2 syntax but
use a version-less /usr/bin/python in its shebang. As a result, if the
user configures Python 3 to be the default Python for /usr/bin/python,
the script fails.

The script(s) should be either fixed to be friendly with both Python 2
and Python 3 or have a version-specific shebang, e.g.
/usr/bin/python2.7.

I have observed the script crash with a SyntaxError on 'print
_("Installed packages.")'

$ lsb_release -rd
Description:    Ubuntu 12.10
Release:        12.10

$ apt-cache policy oneconf
oneconf:
  Installed: 0.2.9.1
  Candidate: 0.2.9.1
  Version table:
 *** 0.2.9.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
        100 /var/lib/dpkg/status

** Affects: oneconf (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "Screenshot of crash"
   
https://bugs.launchpad.net/bugs/1077782/+attachment/3430958/+files/oneconf-python.png

** Description changed:

- At least one Python scripts (/usr/share/oneconf) uses Python 2 syntax
- but use a version-less /usr/bin/python in its shebang. As a result, if
- the user configures Python 3 to be the default Python for
- /usr/bin/python, the script fails.
+ At least one Python script (/usr/share/oneconf) uses Python 2 syntax but
+ use a version-less /usr/bin/python in its shebang. As a result, if the
+ user configures Python 3 to be the default Python for /usr/bin/python,
+ the script fails.
  
  The script(s) should be either fixed to be friendly with both Python 2
  and Python 3 or have a version-specific shebang, e.g.
  /usr/bin/python2.7.
  
  I have observed the script crash with a SyntaxError on 'print
  _("Installed packages.")'
  
  $ lsb_release -rd
  Description:  Ubuntu 12.10
  Release:      12.10
  
  $ apt-cache policy oneconf
  oneconf:
-   Installed: 0.2.9.1
-   Candidate: 0.2.9.1
-   Version table:
-  *** 0.2.9.1 0
-         500 http://us.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
-         100 /var/lib/dpkg/status
+   Installed: 0.2.9.1
+   Candidate: 0.2.9.1
+   Version table:
+  *** 0.2.9.1 0
+         500 http://us.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
+         100 /var/lib/dpkg/status

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1077782

Title:
  oneconf python scripts need Python version-specific shebang

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/oneconf/+bug/1077782/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to