Author guettli
Recipients guettli
Date 2018-11-19.10:38:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Up to now there is no thread way to read the umask in Python

You can use this pattern:

current_umask = os.umask(0)  # line1
os.umask(current_umask)      # line2
return current_umask

A thread which executes between line1 and line2 will have a different umask.

I would be great, if the python standard library would provide correspondig thread safe method.

Related question at stackoverflow:
Date User Action Args
2018-11-19 10:38:14guettlisetrecipients: + guettli
2018-11-19 10:38:14guettlisetmessageid: <>
2018-11-19 10:38:14guettlilinkissue35275 messages
2018-11-19 10:38:14guettlicreate