Asumes Python 3 version of subprocess module

Bug #689127 reported by Fernando Brucher
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pydf (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: pydf

In line 63:
def get_terminal_width_resize():
    c = subprocess.getoutput('resize').split('\n')

The call to subprocess.getoutput() is valid only in Python 3.
But the 1st line is: #! /usr/bin/python
Thus assuming the system default Python version is 3.

There's another call to subprocess in line 293, which is also invalid.

I fixed my script by changing the 1st line to:
#! /usr/bin/python3

But the package dependencies only require python >= 2.2, so this is clearly not a valid fix.

Revision history for this message
emk2203 (emk2203) wrote :

Package erroneously wants to force install of Python 2 if only Python 3 is installed on system, the fix should rather be to remove the Python 2 dependencies.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pydf (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.