Update of /cvsroot/mailman/mailman3/src/mailman/config
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24850

Modified Files:
        __init__.py 
Log Message:
Configuration.quiet: Flag which can be used to disable stderr warning messages
about UID mismatches.


Index: __init__.py
===================================================================
RCS file: /cvsroot/mailman/mailman3/src/mailman/config/__init__.py,v
retrieving revision 3.3
retrieving revision 3.4
diff -u -d -r3.3 -r3.4
--- __init__.py 22 Apr 2004 23:07:54 -0000      3.3
+++ __init__.py 1 May 2004 17:47:00 -0000       3.4
@@ -26,6 +26,8 @@
 
 
 class Configuration:
+    quiet = False
+
     def __init__(self):
         self._conf = None
         self._dirs = []
@@ -58,9 +60,11 @@
             # Set the process's user.
             os.setuid(self.privileges.user.id)
         elif myuid <> targetuid:
-            print >> sys.stderr, 'UID mismatch.  real: %s, target: %s (%s)' % (
+            if not self.quiet:
+                print >> sys.stderr, \
+                      'UID mismatch.  real: %s, target: %s (%s)' % (
                 myuid, self.privileges.user.id, self.privileges.user.name)
-            print >> sys.stderr, 'Permission problems may occur.'
+                print >> sys.stderr, 'Permission problems may occur.'
         # Now that we're running at the proper permission level, create dirs
         for d in self._dirs:
             # Make the given directory if it doesn't exist, but otherwise do


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to