Modify try-except block to handle any exception with appropriate errno
Exception class is not quaranteed to have errno field, it can crash on access.
What other type of exceptions have errno, but are not OSError?
Exceptionclass is not quaranteed to haveerrnofield, it can crash on access.What other type of exceptions have
errno, but are notOSError?
I'm not sure, AFAIK all the built-in Exceptions do, I'd have to look at the source code to see whether or not subprocess.Popen can raise any exceptions without an errno property.
That being said, it solved any issues I had (on Linux). I might make a quick rewrite that can handle exceptions without an errno property later today if I have time.
This is not good enough to apply as-is. Please find out what sort of exception instance caused the problem, then you can reopen the issue with specific problem we can solve.