aboutsummaryrefslogtreecommitdiffstats
path: root/bin/dumpdb
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dumpdb')
-rw-r--r--bin/dumpdb19
1 files changed, 11 insertions, 8 deletions
diff --git a/bin/dumpdb b/bin/dumpdb
index 42166263..09370fd0 100644
--- a/bin/dumpdb
+++ b/bin/dumpdb
@@ -1,6 +1,6 @@
#! @PYTHON@
#
-# Copyright (C) 1998-2004 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2005 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
@@ -132,18 +132,21 @@ def main():
m = []
try:
cnt = 1
- print _('[----- start pickle file -----]')
+ if doprint:
+ print _('[----- start pickle file -----]')
while True:
try:
obj = load(fp)
except EOFError:
- print _('[----- end pickle file -----]')
+ if doprint:
+ print _('[----- end pickle file -----]')
break
- print _('<----- start object %(cnt)s ----->')
- if isinstance(obj, StringType):
- print obj
- else:
- pp.pprint(obj)
+ if doprint:
+ print _('<----- start object %(cnt)s ----->')
+ if isinstance(obj, StringType):
+ print obj
+ else:
+ pp.pprint(obj)
cnt += 1
m.append(obj)
finally: