Question: I have written my own module, mainly handling a filefield for a django site. After messing around with some things related to mod\_wsgi (solved by updating to 3.3), i got my code to run. Right after all the necessary imports, before defining any classes or functions, i test for the availability of sox, an audiocommandlinetool essential to some of my modules functions:

```
sox = 'path/to/sox'
test=subprocess.Popen([sox,'-h'], shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
error=test.communicate()[1]
if error:
    raise EnvironmentError((1,'Sox not installed properly'),)

```

This worked fine. Now i have updated ubuntu from 8.04 to 10.04 and the code aborts on the line of the call to subprocess.Popen, throwing the following error message:

```
File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
    raise child_exception
OSError: [Errno 8] Exec format error  

```

I already looked for execution rights of sox, i have no other idea where to look for a solution of this. Can subprocess execution rights be limited? Any hints what could be going on here?

Answer: 
I would expect the result of the second expression to be `True` regardless of the value of the string `strExt` (any extension is either not equal to "wav" or not equal to "mp3"). What do you expect? 

Are you certain you don't mean a Boolean AND instead of an OR ("extension is neither 'wav' nor 'mp3'")?
The logic behind this makes no sense wouldn't you want to do:

```
if ((strExt !== "wav") && strExt !== "mp3") {

}

```

AND instead of OR makes more sense in this situation.