~ubuntu-branches/ubuntu/hardy/mailman/hardy-updates

« back to all changes in this revision

Viewing changes to Mailman/ListAdmin.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-07-03 16:59:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060703165925-175ubna955u796c0
Tags: 0:2.1.8-1ubuntu1
* Merge to Debian; remaining Ubuntu changes:
  - debian/mailman.init: Create /var/{run,lock}/mailman.
  - debian/control: exim4 -> postfix.
* debian/control: Dependency fix: apache -> apache2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16
16
 
17
17
"""Mixin class for MailList which handles administrative requests.
18
18
 
60
60
DASH = '-'
61
61
NL = '\n'
62
62
 
 
63
try:
 
64
    True, False
 
65
except NameError:
 
66
    True = 1
 
67
    False = 0
 
68
 
63
69
 
64
70
 
65
71
class ListAdmin:
83
89
            except IOError, e:
84
90
                if e.errno <> errno.ENOENT: raise
85
91
                self.__db = {}
 
92
                # put version number in new database
 
93
                self.__db['version'] = IGN, mm_cfg.REQUESTS_FILE_SCHEMA_VERSION
86
94
 
87
95
    def __closedb(self):
88
96
        if self.__db is not None:
122
130
 
123
131
    def NumRequestsPending(self):
124
132
        self.__opendb()
125
 
        # Subtrace one for the version pseudo-entry
 
133
        # Subtract one for the version pseudo-entry
126
134
        return len(self.__db) - 1
127
135
 
128
136
    def __getmsgids(self, rtype):