diff options
| author | bwarsaw | 2001-02-15 17:11:39 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-02-15 17:11:39 +0000 |
| commit | 324774e96bef1f73cb0b0be737551594ceee7eab (patch) | |
| tree | 7e62004d813023b6b0fdd4e91662b054b9d0b6df | |
| parent | 603e63ba04ae7c1c442d85cd223f0141dd539b08 (diff) | |
| download | mailman-324774e96bef1f73cb0b0be737551594ceee7eab.tar.gz mailman-324774e96bef1f73cb0b0be737551594ceee7eab.tar.zst mailman-324774e96bef1f73cb0b0be737551594ceee7eab.zip | |
| -rw-r--r-- | bin/dumpdb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/dumpdb b/bin/dumpdb index 3c2cfa600..7772b0091 100644 --- a/bin/dumpdb +++ b/bin/dumpdb @@ -1,6 +1,6 @@ #! /usr/bin/env python # -# Copyright (C) 1998,1999,2000 by the Free Software Foundation, Inc. +# Copyright (C) 1998,1999,2000,2001 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -24,10 +24,11 @@ Usage: %(PROGRAM)s filename """ import sys -import marshal +import os import pprint import paths +from Mailman.Queue.Switchboard import Switchboard from Mailman.i18n import _ PROGRAM = sys.argv[0] @@ -40,9 +41,9 @@ def main(): except IndexError: print >> sys.stderr, _(__doc__) sys.exit(1) - fp = open(filename) - d = marshal.load(fp) - fp.close() + + # Note: this uses a protected interface + d = Switchboard(os.path.split(filename)[0])._ext_read(filename) pp = pprint.PrettyPrinter(indent=4) pp.pprint(d) |
