When running crudini in some GUI applications, it fails because the stdout is not set:
Traceback (most recent call last):
File "/usr/bin/crudini", line 979, in <module>
sys.exit(main())
File "/usr/bin/crudini", line 975, in main
return crudini.run()
File "/usr/bin/crudini", line 952, in run
sys.stdout.flush()
AttributeError: 'NoneType' object has no attribute 'flush'
When running crudini in some GUI applications, it fails because the stdout is not set:
https://hg.python.org/cpython/file/c9545c2386c4/Python/pythonrun.c#l1094
Suggest adding a check before checking the file descriptors: