[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[minion-cvs] Make pychecker far happier; update many copyright notic...



Update of /home/minion/cvsroot/src/minion/lib/mixminion/directory
In directory moria.mit.edu:/tmp/cvs-serv4440/lib/mixminion/directory

Modified Files:
	Directory.py 
Log Message:
Make pychecker far happier; update many copyright notices; fix a couple actual bugs

Index: Directory.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/directory/Directory.py,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- Directory.py	28 Nov 2003 04:14:04 -0000	1.16
+++ Directory.py	3 Jan 2004 07:35:24 -0000	1.17
@@ -1,4 +1,4 @@
-# Copyright 2003 Nick Mathewson.  See LICENSE for licensing information.
+# Copyright 2003-2004 Nick Mathewson.  See LICENSE for licensing information.
 # $Id$
 
 """mixminion.directory.Directory
@@ -11,7 +11,7 @@
 import os
 import stat
 
-import mixminion.Config as C
+import mixminion.Config
 import mixminion.Crypto
 
 from mixminion.Common import LOG, MixError, MixFatalError, UIError, \
@@ -149,12 +149,12 @@
         else:
             return mixminion.Crypto.pk_PEM_load(fname)
 
-class DirectoryConfig(C._ConfigFile):
+class DirectoryConfig(mixminion.Config._ConfigFile):
     """Configuration file for a directory server."""
     _restrictFormat = 0
     _restrictKeys = _restrictSections = 1
     _syntax = {
-        'Host' : C.ClientConfig._syntax['Host'],
+        'Host' : mixminion.Config.ClientConfig._syntax['Host'],
         "Directory-Store" : {
            "__SECTION__" : ("REQUIRE", None, None ),
            "Homedir" : ('REQUIRE', "filename", None),
@@ -172,7 +172,7 @@
            "Location" : ('REQUIRE', "filename", None)
         } }
     def __init__(self, filename=None, string=None):
-        C._ConfigFile.__init__(self, filename, string)
+        mixminion.Config._ConfigFile.__init__(self, filename, string)
 
     def validate(self, lines, contents):
         import pwd
@@ -186,15 +186,15 @@
         try:
             dir_pwent = pwd.getpwnam(diruser)
         except KeyError:
-            raise C.ConfigError("No such user: %r"%diruser)
+            raise mixminion.Config.ConfigError("No such user: %r"%diruser)
         try:
             cgi_pwent = pwd.getpwnam(cgiuser)
         except KeyError:
-            raise C.ConfigError("No such user: %r"%cgiuser)
+            raise mixminion.Config.ConfigError("No such user: %r"%cgiuser)
         try:
             cgi_grpent = grp.getgrnam(cgigrp)
         except KeyError:
-            raise C.ConfigError("No such group: %r"%cgigrp)
+            raise mixminion.Config.ConfigError("No such group: %r"%cgigrp)
 
         self.dir_uid = dir_pwent[2]
         self.dir_gid = dir_pwent[3]
@@ -212,10 +212,10 @@
         # Make sure that the directory user and the CGI user are both in
         # the CGI group.
         if diruser not in groupMembers:
-            raise C.ConfigError("User %s is not in group %s"
+            raise mixminion.Config.ConfigError("User %s is not in group %s"
                                 %(diruser, cgigrp))
         if cgiuser not in groupMembers:
-            raise C.ConfigError("User %s is not in group %s"
+            raise mixminion.Config.ConfigError("User %s is not in group %s"
                                 %(cgiuser, cgigrp))
 
 class MismatchedID(Exception):