Set umask to 022 instead of the default 077 (closes #2551840) stable
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 21 Jan 2013 17:57:48 +0100
branchstable
changeset 834 2b17abd6f7c9
parent 831 7f222c8bc649
child 836 ed597f4c0f7e
Set umask to 022 instead of the default 077 (closes #2551840) When running tests, make sure we generate world-readable files, because: - checking out a hg repo obeys umask - distutils sdist uses hard links from the source tree when preparing its release tree (and thus uses the same permissions) - distutils sdist doesn't force sane file permissions when it creates a tarball - we could work around the above by setting TAR_OPTIONS when calling sdist, but that would only work with python 2.6 because 2.7 uses the tarfile module instead of forking tar This should fix issues like https://www.logilab.org/ticket/115578
_apycotlib/atest.py
--- a/_apycotlib/atest.py	Thu Aug 30 15:15:04 2012 +0200
+++ b/_apycotlib/atest.py	Mon Jan 21 17:57:48 2013 +0100
@@ -92,6 +92,7 @@
         self._failed_pp = set()
         self.executed_checkers = {}
         self.global_status = SUCCESS
+        os.umask(022)
 
     def __str__(self):
         return repr(self.apycot_repository())