Package: python3.4
Version: 3.4.2~rc1-1

Dear Maintainer,

I recently noticed inconsistent behavior of the function
getstatusoutput from the subprocess module.

According to the help documentation for getstatusoutput the following
should occur in a python3 environment:


>>> import subprocess
>>> subprocess.getstatusoutput('cat /bin/junk')
(256, 'cat: /bin/junk: No such file or directory')
>>>subprocess.getstatusoutput('/bin/junk')
(256, 'sh: /bin/junk: not found')

However, this is what occurs instead:

>>> subprocess.getstatusoutput('cat /bin/junk')
(1, 'cat: /bin/junk: No such file or directory')
>>> subprocess.getstatusoutput('/bin/junk')
(127, '/bin/sh: 1: /bin/junk: not found')

As you can see, the exit status for the 2 calls don't agree with what the
documentation says they should be.

Here's a comparison with python3.2:

>>> import subprocess
>>> subprocess.getstatusoutput('cat /bin/junk')
(256, 'cat: /bin/junk: No such file or directory')
>>> subprocess.getstatusoutput('/bin/junk')
(32512, '/bin/sh: 1: /bin/junk: not found')

It looks to me like the documentation is either wrong, or something has
changed recently with the subprocess module.

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python3.4 depends on:
ii  libpython3.4-stdlib  3.4.2~rc1-1
ii  mime-support         3.57
ii  python3.4-minimal    3.4.2~rc1-1

python3.4 recommends no packages.

Versions of packages python3.4 suggests:
ii  binutils        2.24.51.20140918-1
ii  python3.4-doc   3.4.2~rc1-1
pn  python3.4-venv  <none>

-- no debconf information

--Rod

Reply via email to