]> git.decadent.org.uk Git - dak.git/commitdiff
* daklib/logging.py: Set umask to not exclude group-writability
authorAnthony Towns <aj@azure.humbug.org.au>
Mon, 18 Jun 2007 18:16:22 +0000 (19:16 +0100)
committerAnthony Towns <aj@azure.humbug.org.au>
Mon, 18 Jun 2007 18:16:22 +0000 (19:16 +0100)
so we don't get reminded at the start of each month. Thanks to
Random J.

ChangeLog
daklib/logging.py

index 8f11c89f443270d9602090fab66bfd56e324f6c9..aefe1566bad076d13dadb0af58bebc11db055b2b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-18  Anthony Towns  <ajt@debian.org>
+
+       * daklib/logging.py: Set umask to not exclude group-writability
+       so we don't get reminded at the start of each month. Thanks to
+       Random J.
+
 2007-06-18  Anthony Towns  <ajt@debian.org>
 
        * config/debian/apt.conf, config/debian/apt.conf.stable,
index 9b27aeb790f906eac7fbd6a1a666586954d68e89..d74555026c00d874d9a33a170fd67dc2dc7b40a3 100644 (file)
@@ -39,13 +39,16 @@ class Logger:
         if not os.path.exists(logdir):
             umask = os.umask(00000)
             os.makedirs(logdir, 02775)
+           os.umask(umask)
         # Open the logfile
         logfilename = "%s/%s" % (logdir, time.strftime("%Y-%m"))
        logfile = None
        if debug:
            logfile = sys.stderr
        else:
+           umask = os.umask(00002)
            logfile = utils.open_file(logfilename, 'a')
+           os.umask(umask)
         self.logfile = logfile
         # Log the start of the program
         user = pwd.getpwuid(os.getuid())[0]